diff --git a/src/Ursa.Themes.Semi/Controls/Timeline.axaml b/src/Ursa.Themes.Semi/Controls/Timeline.axaml index 40d3b6a..ef7d859 100644 --- a/src/Ursa.Themes.Semi/Controls/Timeline.axaml +++ b/src/Ursa.Themes.Semi/Controls/Timeline.axaml @@ -48,7 +48,7 @@ Grid.Column="1" RowDefinitions="Auto, *"> (PART_Header); _iconPresenter = e.NameScope.Find(PART_Icon); _contentPresenter = e.NameScope.Find(PART_Content); _timePresenter = e.NameScope.Find(PART_Time); _rootGrid = e.NameScope.Find(PART_RootGrid); + PseudoClasses.Set(PC_EmptyIcon, Icon is null); SetMode(Mode); } @@ -185,6 +185,7 @@ public class TimelineItem: HeaderedContentControl internal void SetWidth(double? left, double? mid, double? right) { + if (_rootGrid is null) return; _rootGrid.ColumnDefinitions[0].Width = new GridLength(left??0); _rootGrid.ColumnDefinitions[1].Width = new GridLength(mid??0); _rootGrid.ColumnDefinitions[2].Width = new GridLength(right??0);