views:

98

answers:

3

Short question: Do any of MS's built in Data Objects support INotifyPropertyChanged?

Long explination: So I'm going to be displaying alot of data with databound controls. The data is going to be chaging somewhat frequently with user interaction. The application is a basic windows form app.

Rather than wire up events for all the data to the display controls I'm hoping that I can use data objects that implement INotifyPropertyChanged, that way the controls don't need to know the how, when or why their data changed just that they need to update themselves.

Sanity check: Am I even barking up the right tree here?

+1  A: 

I have been working for a few months on a rather large windows forms app, and we are using DataBinding and INotifyPropertyChanged for everything. It works really well, and I have no real problems to report. We are using our own classes, because there really isn't a data layer in this application, so I don't know for sure about the MS data classes.

Brandon
A: 

BindableCollection< T > implements INotifyPropertyChanged

Jaime
+1  A: 

The point of INotifyPropertyChange is to report property changes. To that extent, it's supposed to be implemented by specific model classes, not by general-purpose data objects. A more general solution for such objects is provided in form of PropertyDescriptor.AddValueChanged - since PropertyDescriptors can represent "virtual" properties, such as DataRow fields, or WPF attached properties.

Pavel Minaev