PropertyChanged is always null in ViewModelBase?

In your project, you don't actually implement INotifyPropertyChanged on your view-model. You have.

In your project, you don't actually implement INotifyPropertyChanged on your view-model. You have: public class ViewModelBase But this should be: public class ViewModelBase : INotifyPropertyChanged Because you don't implement INotifyPropertyChange, the WPF binding system will not be able to add a handler for your PropertyChanged event.

Wow, thanks! You are totally correct, I though there is something with binding and did not even notice that I don't have INotifyPropertyChanged in view model. – MyUserName Jul 26 at 12:11.

Implement the INotifyPropertyChanged interface on your ViewModelBase. msdn.microsoft.com/en-us/library/system.... You have defined a PropertyChanged event but it is the interface that is important.

I checked you application using MVVM-Light instead of your BaseViewModel implementation, all the things work fine. I suggest you using MVVM-Light because of other features like Messaging, Disposing and Blendability. You can simply download and install it using NuGet.

Anyway if you want to implement INotifyPropertyChange this is code to do that: public class MainViewModel: INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged(string propertyName) { PropertyChangedEventHandler handler = this. PropertyChanged; if (handler! = null) { var e = new PropertyChangedEventArgs(propertyName); handler(this, e); } } }.

Thanks, I'll check it. – MyUserName Jul 26 at 12:25.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions