LayoutPanel 中 UserControl 上的滚动条
我遇到了滚动条和布局面板的问题。我的 LayoutPanel 代码如下所示:
<dxdocking:LayoutPanel Width="450" >
<local:MyUserControl x:Name="UserControl"></local:MyUserControl >
</dxdocking:LayoutPanel>
然后在 MyUserControl 内部如下所示:
<Grid>
<ScrollViewer>
<StackPanel>
---Rest of Code----
</Stackpanel>
</ScrollViewer>
</Grid>
我的目标是使用 UserControl 内部的滚动查看器而不是布局面板,但当 UserControl 变得太大时,它会启用 LayoutPanel 的滚动查看器。它看起来像这样:
我宁愿在必要时启用内部滚动条,并且永远不要让 LayoutPanel 的滚动条可见。我该怎么做?
谢谢!
I'm having an issue with scrollbars and LayoutPanels. My LayoutPanel Code looks like this:
<dxdocking:LayoutPanel Width="450" >
<local:MyUserControl x:Name="UserControl"></local:MyUserControl >
</dxdocking:LayoutPanel>
and then inside of MyUserControl it looks like this:
<Grid>
<ScrollViewer>
<StackPanel>
---Rest of Code----
</Stackpanel>
</ScrollViewer>
</Grid>
My goal is to use the scrollviewer inside of my UserControl rather than the layout panel, but instead it enables the LayoutPanel's Scrollviewer when the UserControl gets too big. It looks like this:
I would rather enable the inner scrollbar if necessary and never have the LayoutPanel's scrollbar visible. How can I do this?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过 LayoutPanel.VerticalScrollBarVisibility 属性禁用面板的嵌入滚动条:
You can disable panel's embedded scrollbars via the LayoutPanel.VerticalScrollBarVisibility property: