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.
-
5How is this question going to solicit debate, arguments, polling, or extended discussion? – yeoman May 27 '16 at 06:40
-
1My thoughts exactly @yeoman . You should start *How is this question going to solicit debate, arguments, polling, or extended discussion?* as a question on stack ^ LOL – Yusha Jan 05 '18 at 18:17
4 Answers
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.

- 117,245
- 29
- 183
- 222
If you know how to use a List , use a List and after that just replace the world 'List' with 'ObservableCollection'.
That's all !! isn't it simple ? :)
And now, every time the collection is changed (item been added\ removed\ replaced) Your bounded UI will be notified about it.

- 6,405
- 14
- 70
- 124
This is a nice introductory article: http://www.codeproject.com/KB/silverlight/SLListVsOCollections.aspx

- 34,151
- 9
- 98
- 120
How about this tutorial: http://www.switchonthecode.com/tutorials/wpf-tutorial-using-the-listview-part-1
Follow the link on this page for part 2 and 3

- 5,178
- 14
- 52
- 78