Not showing items with Visibility=Collapsed in Windows 8.1 GridView

前端 未结 3 663
旧时难觅i
旧时难觅i 2021-01-11 19:32

I have a Windows 8.1 application with a GridView bound to a custom (sortable, deduplicated) observable collection. In this collection, I do some heavy filtering

3条回答
  •  太阳男子
    2021-01-11 20:03

    I tried your sample solution and changed it to a ListView instead. It exhibits the same behavior when the grid itself is hidden. I don't have XAML Spy to verify, but it appears that any List based control will allocate a rendered item for each item in the list.

    I changed your click handlder to instead ds.RemoveAt(5); instead of hiding the item, and the element is removed from view with a nice animation. This appears to be as expected, and an interesting find.

提交回复
热议问题