排序可观察的集合 [英] Sorting observable collection

查看:81
本文介绍了排序可观察的集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在使用一个可观察的集合来绑定列表视图项源,它工作得很好,
但我想对这个集合进行排序而不创建一个新集合并重新绑定Item来源.
有这个想法吗?

Hi all,
I am using an observable collection to bind list view item source, it is working very well,
but I want to sort this collection without creating a new one and rebinding Item source.
Any idea for this?

推荐答案

你好

您可以显式调用OnPropertyChange()
但是:

如果您使用MVVM模式:
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx [ ^ ]

并实施INotifyPropertyChanged,您便拥有所有标准的耗材.
Hello

You can explicitly call OnPropertyChange()
But:

If you use MVVM pattern:
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx[^]

And implement the INotifyPropertyChanged then you have all standard supplies to do it.


这篇关于排序可观察的集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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