列表框中的垂直滚动
您好,我在网格内有一个如下所示的列表框。当项目数量超过列表框的高度时,我无法使列表框内的项目可滚动。
我将 VerticalScrollBarVisibility="Visible"
添加到 ListBox 标记,但它根本不起作用。
阅读有关滚动在堆栈面板中不起作用的地方。
任何人都可以帮我解决这个问题吗?提前致谢!
<ListBox>
<TreeView>
<TreeView.Resources>
<HierarchicalDataTemplate>
<StackPanel>
<TextBlock />
<TextBox></TextBox>
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.Resources>
</TreeView>
</ListBox>
Hi I have a list box as below inside a grid. I cant make the items inside the ListBox scrollable when the number of items exceed the height of the ListBox.
I added VerticalScrollBarVisibility="Visible"
to the ListBox tag but it doesn't work at all.
Read somewhere about scrolling doesnt work in a stack panel.
Anyone can help me with this? Thanks in advance!
<ListBox>
<TreeView>
<TreeView.Resources>
<HierarchicalDataTemplate>
<StackPanel>
<TextBlock />
<TextBox></TextBox>
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.Resources>
</TreeView>
</ListBox>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用 ScrollView 属性:
它应该可以工作...
You should be using the ScrollView property:
It Should work...