TreeView的虚拟化 [英] TreeView Virtualization

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

问题描述

我们正在努力拿出来虚拟化的TreeView 的好方法,数据是不是一个真正的问题,因为它很轻(每件约16个字节) ,问题是,我们可能有成千上万,虽然实际数据将只需要160 KB的内存,树形视图的项目也使用了大量的内存。我们已经尝试虚拟化有3种不同的树,现在,WPF,Infragistics的和的Telerik。他们都有很大的问题,使他们无法使用我们的应用程序:

we're trying to come up with a good way to virtualize the TreeView, the data is not really a problem because it's very light (around 16 bytes per item), the problem is that we could potentially have tens of thousands, and although the actual data would only take 160 kb of memory, the treeview items do use a lot more memory. We've tried virtualization with 3 different trees now, WPF, Infragistics and Telerik. All of them have big issues that makes them unusable for our application:

WPF 的TreeView 的:滚动条显示了一些怪异的行为,跳开了不少,改变大小不一致,用鼠标拖动滚动不能正常工作(跳来回)

WPF TreeView: The scroll bar shows some weird behavior, jumps around a lot, changes size inconsistently, scrolling by dragging it with the mouse doesn't work properly (jumps back and forth)

的Telerik 的:项目消失,滚动条是太不稳定,物品随机展开收起,风格不工作

Telerik: Items disappear, scroll bar is erratic too, items randomly expand collapse, styles don't work

Infragistics的的:项目不虚拟化可言,每一个项目保留在内存使得虚拟化无用

Infragistics: Items are not virtualized at all, every item remains in memory making virtualization useless.

我们一直在努力奋斗着这个一两个月了,我们一直没能找到一个很好的解决方案。先后任你成功地实施了虚拟化在的TreeView 拥有超过9000项?如果是这样,什么是你的策略是什么?您是否使用第三方控件?难道它的工作100%?

We've been struggling with this a couple of months now, and we haven't been able to find a good solution. Has any of you successfully implemented virtualization in a TreeView with more than 9000 items? If so, what was your strategy? Did you use third party controls? Did it work 100%?

任何建议非常AP preciated。

Any suggestion extremely appreciated.

感谢。

推荐答案

我们已经用衣<打击>哥斯达黎加的的一个的ListView 并使用虚拟化的用户界面,效果良好。

We've used Bea Costa's Stollnitz's trick of indenting items in a ListView and using UI Virtualization to good effect.

http://www.beacosta.com/blog/?p=45

我在背的ICollectionView 得到100,000个项目,而且它仍然是相当敏感滤波等。

I've gotten 100,000 items in the backing ICollectionView, and it is still quite responsive to filtering, etc.

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

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