in my MVVM application I have a list of element implementing IDataErrorInfo and INotifyPropertyChanged
the view validate the VM objects when a propertychanged event is raised.
the problem is that the validation result depends not only by the internal state of the object but also by the “enviroment” that is the other objects belonging to the list.
So I need that the validation is called on all the elements of the list every time that an object is deleted or updated.
How can i force the validaiton in this way?
Hey I have an answer to your question. The default list called ObservableCollection will raise an event only if elements are added or deleted. If the element changes property wont be raised.
You can subclass ObservableCollection and add event for every item. There is a very nice implementation in this link given by a fellow from StackOverFlow.
ObservableCollection that also monitors changes on the elements in collection
Its too good, I have tried and used. It works superb. Hope it helps you and puts you in right direction!!!