WPF ListView分组和性能 [英] WPF ListView Grouping and Performance

查看:439
本文介绍了WPF ListView分组和性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常基本的问题:在ListView上使用分组时,虚拟化功能已关闭,性能很差.我需要分组并且需要虚拟化,因为我每天查看多达100.000个项目,并且列表在不断增长.一世 希望保持TreeView用户体验,并可以显示有关组中项目的一些信息.分组是可变的,分组属性的顺序可以更改,使用过的属性也可以更改(我可以将0个或最多5-6个属性分组 订单).

I have a very basic problem: When the grouping is used on ListView the virtualization is turned off and performence is very bad. I need grouping and I need virtualization, because I view up to 100.000 items each day and list is continously growing up. I would like to keep the TreeView user experience with possibility of displaying some info about items in group. Grouping is variable, order of grouped properties can change, used properties can also change (I can group with 0 or up to 5-6 properties in any order).

我知道,我需要一个FlatCollectionView,因此我将启用虚拟化.我需要类似TreeView的演示文稿.我找到了解决方案 FlatGroupedCollectionView (不幸的是,仅用于对一个属性进行分组),并且 可正常工作的虚拟化实施FlatTreeView .

I know, I need a FlatCollectionView, so I would have virtualization turned on. I need a TreeView like presentation. I found solution for FlatGroupedCollectionView (unfortunatelly works just for grouping with one property) and also implementation of FlatTreeView with working virtualization.

我需要合并";这些解决方案.

I need "merge" of this solutions.

您是否曾经尝试达到这样的目标?你成功了吗?我不太希望实现此;-)...

Have you ever tried to reach such a target? Were you successfull? I'm not really looking forward to implement this ;-)...

谢谢

推荐答案

我以为.net 4现在支持TreeView虚拟化了?

I thought .net 4 now supports Virtualisation with TreeView?

Ben Carter在groupng/virtualisation中有一个很好的例子,在这里: http://code.msdn.microsoft.com/Grouping-and-Virtualization-56e7d3fe

Ben Carter has a nice exmaple of groupng/virtualisation here : http://code.msdn.microsoft.com/Grouping-and-Virtualization-56e7d3fe

这里还有一个非常有用的博客: http://www.beacosta.com/blog/?p=45

There is also a very useful blog about it here: http://www.beacosta.com/blog/?p=45

希望有帮助吗?

此致,
佩德罗(Pedro)

Regards,
Pedro


这篇关于WPF ListView分组和性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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