#887 – The Difference between Disabled and Hidden Scrollbar Visibility
August 19, 2013 1 Comment
- Hidden – Scrollbar is not shown, but content is allowed to scroll (e.g. using arrow keys). Content in ScrollViewer is given an infinite amount of space in the scrolling direction. (E.g. Infinite width if HorizontalScrollBarVisibility is set to Hidden).
- Disabled – Content cannot scroll and is not allowed to be larger than the ScrollViewer’s size in the scrolling direction.
We can see how this works by placing a horizontally-oriented WrapPanel inside a ScrollViewer. When the HorizontalScrollBarVisibility is set to Hidden, the WrapPanel is infinitely wide and therefore never wraps. (You can still scroll the content using the arrow keys).
If the HorizontalScrollBarVisibility is set to Disabled, the WrapPanel can’t scroll horizontally and its width is constrained to the width of the ScrollViewer, causing it to wrap.