开发者

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 t开发者_运维百科he horizontal scroll viewer. here is an example:

so here both scrollers are visible because scrolling is enabled:

Make vertical ScrollViewer invisible

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

Make vertical ScrollViewer invisible

Now note what happens with the vertical scroller:

Make vertical ScrollViewer invisible

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:

Make vertical ScrollViewer invisible

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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜