Hi i have a List where myclass have a name property, nothing fancy (for now). I have two way binding on the name and want the same on the list, that means that if i remove or add a new item to the list i want my ui to reflect this, how to do this?
views:
21answers:
1
+1
A:
You implement your List using the ObservableCollection<T>
class.
When items are removed or added or when members that implement INotifyPropertyChanged have such properties modified the UI object observing the collection will be updated.
Alternatively if you existing List implementation is specialised and you'd rather not derive from the ObservableCollection<T>
then you can implement INotifyCollectionChanged
and INotiftyPropertyChanged
on your specialised List class to acheive the same goal.
AnthonyWJones
2009-11-13 13:39:16