WPF Horizontal Scrollbar is not visible

与世无争的帅哥 提交于 2019-12-22 06:28:11

问题


     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.


回答1:


Set the HorizontalScrollBarVisibility of the ScrollViewer to "Auto" or "Visible".

<ScrollViewer HorizontalScrollBarVisibility="Auto">
   <Grid>
   ... rows ...
   </Grid>
</ScrollViewer>


来源:https://stackoverflow.com/questions/2679713/wpf-horizontal-scrollbar-is-not-visible

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!