BringIntoView不适用于TreeView [英] BringIntoView does not work for TreeView

查看:87
本文介绍了BringIntoView不适用于TreeView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WPF 4.0

Visual Studio 2010 Premium

Visual Studio 2010 Premium

我以无数据绑定的代码将项目添加到树视图中.

I add items to a treeview in code no databinding.

最后,我有一个"root" treeviewitem.我想让它可见.

At the end I have a "root" treeviewitem.  I want to make it visible.

使用"root" treeviewitem如下:

Using the "root" treeviewitem as follows:

root.BringIntoView()

如果我尝试使用树视图本身,则需要一个矩形.我对此感到茫然.大量的谷歌搜索没有提供任何帮助.

If I attempt to use the treeview itself it wants a rectangle.  I am at a loss for this.  Lots of googling has provided nothing.

谢谢

推荐答案

尝试使用这种方式,请参考下面的链接

try using this way ,refer to the link below

http://social.msdn.microsoft .com/Forums/zh-CN/wpf/thread/b782ba56-cf27-4936-9319-ebc4ec2a6112


这篇关于BringIntoView不适用于TreeView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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