Skip to content

Instantly share code, notes, and snippets.

@oloopy
Created April 4, 2014 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oloopy/9980631 to your computer and use it in GitHub Desktop.
Save oloopy/9980631 to your computer and use it in GitHub Desktop.
Implementation of INotifyPropertyChanged for ViewModel
using System.ComponentModel;
using System.Runtime.CompilerServices;
public class ViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment