Closed MikeWilliams-UK closed 3 years ago
Hi,
that's the expected behaviour. When using the mouse wheel the VirtualizingWrapPanel scrolls 3 items by default. But it never scrolls more than the viewport, therefore it may looks like it does not scroll itemwise.
You can change the number of items scrolled by mouse wheel by setting the the property MouseWheelDeltaItem
to an integer value.
If that's so why does it scroll by a whole item when you click on the arrows.
That's because the implementation handling the scrollbar arrows does not use the property and scrolls fixed one item.
This difference also exists when scrolling by pixel. The mouse wheel scrolls 48 pixels and the arrows 16 pixels. This are the default values also used by other WPF controls.
I shall try setting MouseWheelDeltaItem to 1 to see if it fixes our issue
Right, let me know if that solves your issue.
Thanks, setting MouseWheelDeltaItem to 1 did the trick.
Describe your issue I have set VirtualizingStackPanel.ScrollUnit="Item"
However scrolling with mouse wheel does not scroll by Item when ItemSize is set. Scrolling by clicking on the arrows of the scroll bar works as expected. It's reproducable in Tab2 of your examples.
Version Info Package Version 1.5.3 .NET Version: 4.8 OS Version: Windows 10 1903 build 18362.1139