1
peeps

Eric De Carufel's .NET blog: Type-safe INotifyPropertyChanged and derived classes

posted by http://jonnyboats.wordpress.com/http://jonnyboats.wordpress.com/ 1035 days, 3 hours, 28 minutes ago
Thursday, July 23, 2009 2:58:44 PM GMT

Some of you who read my previous blog post notice that this technique doesn't allow to raise “PropertyChanged” event from a derived class. This is because you can only call method of “PropertyChangedEventHandler” from the class where it is defined. Anywhere else you can only assign (+=) and unassign (-=) event handler.

One way to work around this is to add a method in your base model class that will forward the call to “PropertyChangedEventHandler”. Here is a modified copy of the class from my previous...

category: News | clicked: 0 | | source: blog.decarufel.net | show counter code
tags: .NET

No comments yet, be the first one to post comment.

To post your comment please login or signup