ScrollViewer问题 [英] ScrollViewer Question

查看:72
本文介绍了ScrollViewer问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我将一个Canvas放在ScrollViewer中,然后在后面的代码中将UIElements添加到画布,我应该期望Canvas增长吗?ScrollViewer允许我在Canvas中滚动吗?

If I place a Canvas in a ScrollViewer and then add UIElements to the canvas in code behind, should I expect the Canvas to grow and the ScrollViewer to allow me to scroll around the Canvas ?

我原以为是..但它似乎对我不起作用。

I would have thought Yes.. but it doesn't seem to work for me.

推荐答案

使用网格。   Canvas是这种情况的不佳选择。

Use Grid.  Canvas is a poor choice for this scenario.

请参阅此文档:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh465337.aspx

和布局部分。


这篇关于ScrollViewer问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆