stil
stil

Reputation: 5556

Fluent scroll in ListBox

Is it possible to have a fluent scroll in ListBox? I mean, so you can also scroll through item content, not through items as whole.

<ListBox Height="59" ScrollViewer.CanContentScroll="True" Grid.Row="2" ScrollViewer.VerticalScrollBarVisibility="Visible" />

As you can see on the picture, first item is far too large, but I still can't scroll through its content.

illustration

Upvotes: 0

Views: 330

Answers (1)

Mike Strobel
Mike Strobel

Reputation: 25623

You can set ScrollViewer.CanContentScroll="False" to enable scrolling by pixels. Setting it to True (the default) enables scrolling by whole items, so scrolling down by a single "line" will attempt to bring the entire next item into view. That can cause you to jump past parts of the current item if it doesn't fit entirely within the viewport, which sounds exactly like what is happening.

Upvotes: 1

Related Questions