0
votes

I'm using a ListBox that is styled via a ScrollViewer containing a StackPanel.

To allow scrolling, it uses RepeatButtons to call ScrollBar.LineUpCommand and ScrollBar.LineDownCommand.

The controls display correctly and the buttons cause the ScrollViewer to scroll.

But each press of the button only scrolls the list by less than an item.

How do I set the ScrollBar.SmallChange to match the the height of an ListBoxItem?

1
It looks like the ListBox is doing physical scrolling instead of logical. See stackoverflow.com/questions/3029981/… - PenFold

1 Answers

0
votes

StackPanel is implementing the IScrollInfo, thus you can set CanContentScroll="True" on the scroll viewer and it will pass information about scrolling to the stack panel.

The StackPanel is scrolling by item height.