inject INotifyPropertyChanged into POCO

Coordinator
Feb 29, 2012 at 9:52 PM

first of all I use another interface called INotifyable because INotifyPropertyChanged does not allow triggering PropertyChanged from autside, It just allows for registration for change notifications.

 

I have a class wrapper that implements both of thease , so that you can trigger changeNotification and WPF controls can register for notifications.

I use caonverter that when binding will wrap POCO entity and give WPF the notifyable object. I also register created wrappers in dictionary. So after changing entity, I just get wrapper for the entity and call OnChange("propertyName")