的ObservableCollection教程? [英] ObservableCollection tutorial?

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

问题描述

没有人会直接我如何使用的ObservableCollection一些简单的,图形化的教程。我通过MSDN去,但我似乎并不理解他们。我似乎无法找到对谷歌更好的要么。我在寻找与所有步骤详细的解释简单的例子。

Will anyone direct me to some simple, graphical tutorial on how to use ObservableCollection. I went through msdn but I don't seem to understand them. I can't seem to find better ones on google either. I'm looking for simple example with full explanation on all steps.

推荐答案

我不知道的ObservableCollection 的任何图形教程。在的ObservableCollection< T> 类是一个集合类型(如列表< T> ),这意味着它持有的对象给定类型 T 。是什么让的ObservableCollection 特殊的是,当一个新的对象被添加或当一个对象被删除,它告诉观察家。这是特别有用的UI的使用WPF实现的,因为esentially,当一个对象被添加或删除一个观察的集合,用户界面​​将自动更新。这是因为,当绑定到一个观察的集合,WPF会自动添加一个事件处理程序的 ObservableCollecion 的的 Col​​lectionChanged 事件。

I don't know of any graphical tutorial of ObservableCollection. The ObservableCollection<T> class is a collection type (like List<T>) which means that it holds objects of a given type T. What makes ObservableCollection special is that it "tells" observers when a new object is added or when an object is removed. This is especially useful for UI's implemented using WPF, because esentially, when an object is added to or removed from an observable collection, the UI is automatically updated. This happens because, when binding to an observable collection, WPF automatically adds an event handler to the ObservableCollecion's CollectionChanged event.

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

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