需要滚动一个 WPF 网格
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/839062/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 20:23:33 来源:igfitidea点击:
Need to scroll one WPF Grid
提问by Dave Clemmer
I want to create two grids in the WPF Page. One Grid
need scrollbar or scroll viewer. Another Grid
is static.The grids are placed one by one in the page. How can I create and set the scroll in first Grid
?
我想在 WPF 页面中创建两个网格。一个Grid
需要滚动条或滚动查看器。另一种Grid
是静态的。网格在页面中一一放置。如何首先创建和设置滚动Grid
?
回答by aladinfajr
<ScrollViewer>
<StackPanel>
...
</StackPanel>
</ScrollViewer>
回答by Dave Clemmer
Sounds like this user justs wants the first grid to scroll, such as:
听起来这个用户只是希望第一个网格滚动,例如:
<StackPanel>
<ScrollViewer>
<Grid>
</Grid>
</ScrollViewer>
<Grid>
</Grid>
</StackPanel>