Make a Scrollviewer not vertically scrollable

56 Views Asked by At

I have a ScrollViewer which I don't wish to be scrollable vertically. I have its VerticalScrollBarVisibility set to Hidden, but I can still scroll with the mouse wheel.

Is it possible?

1

There are 1 best solutions below

0
On BEST ANSWER

Set VerticalScrollBarVisibility to Disabled, and its content will only be given as much vertical space as exists in the viewport.

A value of Hidden still allows the content to extend beyond the viewport, and you can still issue scrolling commands; the scroll bar itself is hidden, but scrolling is not disabled.