Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make vertical ScrollViewer invisible

I have a ScrollViewer control in my window and I would like to hide it when the user cannot scroll down the page. Just like with the horizontal scroll viewer. here is an example:

so here both scrollers are visible because scrolling is enabled: enter image description here

if I collapse some of the columns of my listview note how eventually the horizontal scroller disappears: enter image description here

Now note what happens with the vertical scroller:

enter image description here

so far its visible and that's ok because not all the content fits in the page. But let me maximize the page and co-lapse all the group boxes so that all the content fits in the page:

enter image description here

Why is it visible if it is not possible to scroll? I set all the group boxes height = 0 except the last one and the vertical scroller still shoes up? The horizontal scroller disappeared when it was not possible to scroll any more. Why does the vertical scroller does not behave the same way?

What can I do to make it invisible when it is not possible to scroll?

like image 978
Tono Nam Avatar asked Jun 30 '11 22:06

Tono Nam


1 Answers

Make sure that your Scrollviewer's VerticalScrollBarVisibility = ScrollBarVisibility.Auto;

like image 107
Ed Bayiates Avatar answered Oct 26 '22 15:10

Ed Bayiates