I've implemented the INotifyPropertyChanged interface for a simple WPF view-viewmodel and when I call my
protected void RaisePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
on GoodText's set like
this.RaisePropertyChanged("GoodText");
the PropertyChanged event has a method that I never assigned to it.
When it has been assigned? Who did it?
EDIT:
Thank you, great advices, but I think Willem's answer is what i was searching for, i mean: when I say
<Button Content="Button" Command="{Binding CheckButtonCommand}" />
It's something like (ugly pseudocode)
PropertyChanged += Button.GiveMeThePropertyValue;
? So the binding added the handler to the PropertyChanged event?