WPF TreeView垂直滚动条问题 [英] WPF TreeView verticle scrollbar question

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

问题描述

当我拖动GridSplitter时,保留TreeView的Border会在需要时自动显示水平ScrollBar.
当我的TreeView项超出Borders垂直边界时,是否可以得到类似的verticaly行为?
我很难找到这种行为.默认情况下,一旦降低放置树状视图的原始网格的高度,它就会立即显示垂直滚动条.没问题.

不知何故,你搞砸了.如果您只显示了最少的代码即可重现此问题,则可能会获得更多帮助.在理想情况下,它只会使用XAML,只有一个:Window,一个具有行定义的Grid,一个GridSplitter和一个TreeView.

—SA


When I drag my GridSplitter , the Border that holds my TreeView automtically displays a horizontal ScrollBar when needed .
Can I get similar behavior verticaly when my TreeView Items list out of Borders verticle bounds.
I''m having a hard time finding this behavior.

解决方案

In great disbelieve (am I missing something?!), I just tested it. By default, it shows the vertical scroll bar as soon as you decrease the height of the grid raw where the tree view is placed. No problem.

Somehow, you screw it up. It you show possibly minimal code which reproduces the problem, you might get some more help. In perfect case, it would XAML only, with only: one Window, one Grid with row definitions, one GridSplitter and one TreeView.

—SA


这篇关于WPF TreeView垂直滚动条问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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