toni
toni

Reputation: 41

XAML WPF Vertical Scroll bar line by line instead of group by group when grouping

What I want to do is scrolling line by line instead of group by group when my items in listview are grouped and I press down/up arrow button of vertical scroll bar.

Upvotes: 4

Views: 1651

Answers (1)

Nick
Nick

Reputation: 2265

I had this same problem and found this post to see if there was an answer. I finally found a solution to the problem. I wrote my own ControlTemplate for the ListView control and I didn't add the following trigger:

<Trigger Property="IsGrouping" Value="true">
     <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
</Trigger>

So apparently, if you set the ScrolLViewer.CanContentScroll property to false, it will work like a charm. Seems counter-intuitive, but it worked for me. If you post more code, maybe we could help you more.

Upvotes: 6

Related Questions