WPF水平滚动条不可见 [英] WPF Horizontal Scrollbar is not visible
本文介绍了WPF水平滚动条不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在ScrollViewer中有一个网格.网格只有一列和许多行.我将控件添加到网格行中.问题是我在添加控件时可以看到VerticalScrollBar,但是我添加了非常宽的控件却看不到HorizontalScrollBar.
我的xaml如下所示
I have a Grid inside ScrollViewer. Grid has only one columns and many rows. I add controls into grid rows. The problem is I can see VerticalScrollBar when I am adding controls but I cannot see HorizontalScrollBar although I add very wide controls.
My xaml looks like the following
<ScrollViewer>
<Grid>
rows ...
</Grid>
</ScrollViewer>
谢谢,
蚂蚁.
Thanks,
ant.
推荐答案
将ScrollViewer的HorizontalScrollBarVisibility设置为自动"或可见".
Set the HorizontalScrollBarVisibility of the ScrollViewer to "Auto" or "Visible".
<ScrollViewer HorizontalScrollBarVisibility="Auto">
<Grid>
... rows ...
</Grid>
</ScrollViewer>
这篇关于WPF水平滚动条不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文