调用ScrollToHorizontalOffset或ScrollToVerticalOffset时,不会出现ScrollViewer滚动条 [英] ScrollViewer scrollbars don't appear when calling ScrollToHorizontalOffset or ScrollToVerticalOffset
本文介绍了调用ScrollToHorizontalOffset或ScrollToVerticalOffset时,不会出现ScrollViewer滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ScrollViewer
ScrollToHorizontalOffset
或 ScrollToVerticalOffset
叫.
In Windows Phone ScrollViewer
scrollbars
do not appear when ScrollToHorizontalOffset
orScrollToVerticalOffset
are
called.
ScrollViewer Name="MyScroll" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Background="{TemplateBinding Background}"
The scroll works fine but the scrollbars do not appear.
推荐答案
您是否在进行更改后尝试了UpdateLayout?
Hi, did you try UpdateLayout after making the change?
ScrollViewer.ScrollToHorizontalOffset方法
另外一个论坛用户中的一个用户报告需要在进行更改之前调用InvalidateScrollInfo,并在更改之后调用UpdateLayout才能使其生效.
Also a user in another forum user reported a need to call InvalidateScrollInfo before making the change, and UpdateLayout after the change to make it work.
-马克
这篇关于调用ScrollToHorizontalOffset或ScrollToVerticalOffset时,不会出现ScrollViewer滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文