[英]How to put a scrollbar in windows app .xaml?
所以,只需创建一个基本的应用程序,完整的菜鸟,我如何滚动
<Grid>
<Textblock>
<Button>
<Textblock>
<Button>
<Textblock>
<Button>
<Textblock>
<Button>
......
</Grid>
只是一个带有许多文本块和按钮的基本网格,现在由于它不适合屏幕,我如何使滚动条看起来向下滚动。
您将需要一个ScrollViewer
控件,并且(因为ScrollViewer仅允许一个内容元素)一些布局容器,例如StackPanel
。 例:
<Grid>
<ScrollViewer>
<StackPanel Orientation="Vertical">
<Textblock>
<Button>
<Textblock>
<Button>
<Textblock>
<Button>
<Textblock>
<Button>
......
</StackPanel>
</ScrollViewer>
</Grid>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.