在WPF 2中添加滚动条 [英] Add scrollbar in WPF 2

查看:85
本文介绍了在WPF 2中添加滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我正在尝试将滚动条添加到我的WPF应用程序中,但它似乎不起作用。 滚动条的两端显示但是实际的栏不可见。

有没有人知道这个问题的解决方案请

谢谢

Hello. I am trying to add scrollbars into my WPF application but it doesn't seem to work. Only he two ends of the scrollbars show but the actual bar isn't visible.
Does anyone know the solution to this problem please
Thanks

推荐答案

只有滚动条的两端显示但实际的条形图不可见

这可能是因为滚动中没有任何内容。默认情况下, ScrollViewer.Horizo​​ntalScrollBarVisibility属性 [ ^ ]& ScrollViewer.VerticalScrollBarVisibility Property [ ^ ]是'自动',因此它们应该出现。



如果你想让它一直可见或让其中一个完全自动/不可见那么你可以明确地设置它:ScrollBarVisibility枚举 [ ^ ]
Only he two ends of the scrollbars show but the actual bar isn't visible
This might be because there is nothing in it to scroll. By default, ScrollViewer.HorizontalScrollBarVisibility Property [^] & ScrollViewer.VerticalScrollBarVisibility Property[^] are 'Auto' and thus they appear when it should be.

If you want that to be visible all the time or let one of them be auto/not visible at all then you can set it explicitly: ScrollBarVisibility Enumeration[^]






在这里找到答案



http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/9afdc4a7-87df-4519-9449 -8c0c7223bdf7 / [ ^ ]



http://stackoverflow.com/questions/2028459/wpf-itemscontrol-with-scrollbar-scrollviewer [ ^ ]



http://stackoverflow.com/questions/1192335/automatic-vertical-scroll-bar-in-wpf-textblock [ ^ ]
Hi,

find the answer here

http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/9afdc4a7-87df-4519-9449-8c0c7223bdf7/[^]

http://stackoverflow.com/questions/2028459/wpf-itemscontrol-with-scrollbar-scrollviewer[^]

http://stackoverflow.com/questions/1192335/automatic-vertical-scroll-bar-in-wpf-textblock[^]


http:// wpfbugs。 blogspot.in/2014/02/wpf-layout-controls-scrollviewer.html [ ^ ]


这篇关于在WPF 2中添加滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆