windows Phone:一个关于ScrollViewer无法滑动到底端的小提示

  上次测试提bug,我才发现在两个页面都使用了ListBox,但是有一个可以自由的滑动到底部,一个却只能显示前几项,无法自由的滑动,百谷歌度了一下,终于知道怎么回事。

原因如下:

  If you have other UIElements above the ScrollViewer those will still occupy the top of your screen with only the section occupied by the ScrollViewer being scrolled. To prevent that you'll have to have all the UIElements, including ContentPanel, be placed in the ScrollViewer。果然在我的布局中,ListBox外面添加了一个StackPanel,呵呵,去掉以后就可以自由滑动了。

  呵呵,遵守游戏规则,享受胜利成果!

posted @ 2012-10-30 10:10  Lirica  阅读(227)  评论(0编辑  收藏  举报