sbaeumlisberger / VirtualizingWrapPanel

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

ScrollIntoView function appear offset when using VirtualizableWrapPanel AllowDifferentSizedItems #54

Closed wuyang26 closed 6 months ago

wuyang26 commented 6 months ago

1 run demo 2 select tab "VirtualizableWrapPanel AllowDifferentSizedItems" 3 input number in the ScrollIntoView(Number) textbox, for example: 500 0r 800 4 you can find the listview can not scroll the 500 or 800 block position.

sbaeumlisberger commented 6 months ago

That's be design. If you need exact positioning and scrolling with different sized items you have to set the ItemSizeProvider property. This is shown in the "VirtualizableWrapPanel AllowDifferentSizedItems Lazy IItemSizeProvider" tab.

More information here: https://github.com/sbaeumlisberger/VirtualizingWrapPanel/blob/master/GettingStarted.md#different-sized-items and here: https://sbaeumlisberger.github.io/VirtualizingWrapPanel/api/WpfToolkit.Controls.IItemSizeProvider.html