fix: hack a default size.

This commit is contained in:
rabbitism
2024-02-08 20:14:11 +08:00
parent 2a08391dc7
commit c288836ce6
2 changed files with 6 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ public class MenuViewModel: ViewModelBase
new() { MenuHeader = "NumericUpDown", Key = MenuKeys.MenuKeyNumericUpDown, Status = "New" },
new() { MenuHeader = "Pagination", Key = MenuKeys.MenuKeyPagination },
new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider, Status = "New"},
new() { MenuHeader = "Selection LIst", Key = MenuKeys.MenuKeySelectionList, Status = "New" },
new() { MenuHeader = "Selection List", Key = MenuKeys.MenuKeySelectionList, Status = "New" },
new() { MenuHeader = "TagInput", Key = MenuKeys.MenuKeyTagInput },
new() { MenuHeader = "Theme Toggler", Key = MenuKeys.MenuKeyThemeToggler },
new() { MenuHeader = "Timeline", Key = MenuKeys.MenuKeyTimeline, Status = "Updated" },

View File

@@ -70,6 +70,11 @@ public class SelectionList: SelectingItemsControl
if (container is null) return size;
_indicator.Arrange(container.Bounds);
}
else
{
// This is a hack. The indicator is not visible, so we arrange it to a 1x1 rectangle
_indicator?.Arrange(new Rect(new Point(), new Size(1, 1)));
}
return size;
}