Here’s a quick tip for those who want to write propertychanged events but dislike frameworks;
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
Example;
Guid currentProfileId;
public Guid CurrentProfileId
{
get
{
return this.currentProfileId;
}
set
{
if (this.currentProfileId != value)
{
this.currentProfileId = value;
NotifyPropertyChanged();
}
}
}