sbaeumlisberger / VirtualizingWrapPanel

Implementation of a comprehensive VirtualisingWrapPanel for WPF
MIT License
242 stars 33 forks source link

[2.0.0-preview3] Height calculation when using grouping with ItemSizeProvider #48

Closed drapka closed 9 months ago

drapka commented 9 months ago

Hi, believe I've identified a bug when using grouping along with ItemSizeProvider. When I start decreasing the size of the panel, the space for group grows. However, when I start increasing the size of the panel, the height of the space reserved for group does not change, leaving empty space.

The problem can be reproduced by changing the demo app a bit, I used VirtualizingWrapPanel ItemSizeProvider tab for this:

  1. add VirtualizingPanel.IsVirtualizingWhenGrouping="True" to the ListView
  2. add <ItemsControl.GroupStyle> to the ListView
  3. start the demo app, select the tab and start resizing - first decreasing the window size so that the first group grows and then start increasing it (there are many items in the first group so the initial size needs to be bigger to see the bottom of the first group or you can lower the items count).

Version Info Package Version: 2.0.0-preview3 .NET Version: NET Framework 4.7.2 OS Version: Windows 11 Pro 22621.2715

I really love this library, as it might save me a ton of time in creating my solution. I use this for a device dashboard with a card representing each device. The card is composed of many components, and without virtualization, the performance is awful while rendering 100+ items.

sbaeumlisberger commented 9 months ago

Hi, I was able to reproduce and fix your issue. The nuget package is submitted and will be available soon. https://www.nuget.org/packages/VirtualizingWrapPanel/2.0.0-preview4