feat: update timelineitem layout.

This commit is contained in:
rabbitism
2023-03-23 23:14:29 +08:00
parent 36e3e88276
commit 2b183027b1
5 changed files with 120 additions and 77 deletions

View File

@@ -44,12 +44,13 @@ public class Timeline: ItemsControl
{
if (this.LogicalChildren[i] is TimelineItem t)
{
t.SetPosition(i == 0, i == this.LogicalChildren.Count - 1);
t.SetIndex(i == 0, i == this.LogicalChildren.Count - 1);
}
else if (this.LogicalChildren[i] is ContentPresenter { Child: TimelineItem t2 })
{
t2.SetPosition(i == 0, i == this.LogicalChildren.Count - 1);
t2.SetIndex(i == 0, i == this.LogicalChildren.Count - 1);
}
}
}
}