One way to ease writing PropertyChanged events

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));


Guid currentProfileId;
public Guid CurrentProfileId
    return this.currentProfileId;
    if (this.currentProfileId != value)
      this.currentProfileId = value;

This entry was posted in Silverlight, Windows 8, Windows Phone and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s