Won't Fix
Last Updated: 30 Mar 2020 10:10 by ADMIN
Martin Ivanov
Created on: 23 Mar 2020 09:57
Category: VirtualizingWrapPanel
Type: Bug Report
VirtualizingWrapPanel: Empty space is allocated for items with Visibility set to Collapsed
The panel allocates empty space for items that are hidden by setting their Visibility to Collapsed. Such items should be ignored when the panel arranges its items.

To work this around, instead of the Visibility property, you can remove and add the items in the ItemSource collection whenever you need to toggle their visibility.
1 comment
Posted on: 30 Mar 2020 10:10


When using a VirtualizingPanel (which is our VirtualizingWrapPanel and the MS VirtualizingStackPanel) playing with the visibility of the items is very tricky. These panels should start generating their containers based on the items count of the ItemsControl's items because they do not have any realized children. This is not the case with MS WrapPanel, it generates all items so it can easily check when a container is visible or not. The MS VirtualizingStackPanel also has a problem when the containers are not visible. On the first side, there is no gap problem, because there all containers are on top of each other, but the issue can be reproduced when we have many invisible containers - then the thumb of the scrollbar is not correctly calculated. The scenario should be resolved by introducing a mechanism for filtering the items in the ItemsControl on item level (i.e. filtering the source collection) or adding/removing a data item from it.

Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.