ViewModelBase
The ViewModelBase abstract class is designed to serve as a base class for any view model that needs to raise the PropertyChanged event.
ViewModelBase
implements the INotifyPropertyChanged
interface. This means that you can directly inherit the class in your view models instead of implementing the interface for each model separately.
Example 1: Custom ViewModel that inherits ViewModelBase
OnPropertyChanged
method. The OnPropertyChanged
method supports also the CallerMemberName attribute which means that you can call the method without providing the property's name.