I want to fill a ListView
with items as long as they fit on the current page sothat I do not have to scroll. For this I want to add an item, check it's height and if it is too big to fit in the remaining space I want to remove it.
My questions are:
- Is there a smarter way to solve this?
- When to check the realized items height?
In Windows 8.1 the ListView
control does not have an ItemRealized
or ItemCreated
event. So when to check the item's container size?
I try to get the size via
UIElement container = (UIElement)ItemsListView.ContainerFromItem(obj);
double height = container.DesiredSize.Height;
Thanks for your help!