In this blogpost I want to show you how to use WPF CallMemberName for INotifyPropertyChanged.
Regarding to this blogpost here I showed up how to implement the INotifyPropertyChanged.
Well with .Net-Framework 4.5 a new solution came up to make it even more simple:
Instead of the “old” (but working) base-class
The OnPropertyChanged can be replaced with:
The CallMemberName-Attribute is automatically set to the PropertyName which calls it. So the usage in the ViewModel (or whereever you throw the event) is now a simple:
See: You do not need to give a func. instead you are only calling the method whithout any paramters.
Solution with a command-implementation can be found here: DataBindingGettingStarted