MaterialDesignInXamlToolkit
MaterialDesignInXamlToolkit copied to clipboard
Grouped ListView item scrolling
Hi, for grouped ListView items the ScrollViewer doenst scroll correctly. Seems like ScrollViewer.CanContentScroll isnt switched right, because the group is scrolled as a whole item which produces awkward results.
Sample: https://github.com/JDeuker/MaterialDesignListViewTest
Thanks!
I'm having the same issue here. After a little digging, it looks like the default ScrollViewer style that is used for the GridView control explicitly sets CanContentScroll to True which enables logical scrolling. To disable it, you'll need to nicely override it by throwing this into your ListView control.
<ListView.Resources>
<Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}"
BasedOn="{StaticResource {x:Static GridView.GridViewScrollViewerStyleKey}}"
TargetType="ScrollViewer">
<Setter Property="CanContentScroll" Value="False"/>
</Style>
</ListView.Resources>
I tested this with your sample and it seems to enable pixel scrolling like you would expect. Just remember now that scrolling can be a little slower depending on the size of your list.
Hope that helps!