Skip to content

Instantly share code, notes, and snippets.

@adilmughal
Created March 27, 2014 02:38
Show Gist options
  • Save adilmughal/9798916 to your computer and use it in GitHub Desktop.
Save adilmughal/9798916 to your computer and use it in GitHub Desktop.
MVVM_ContactForm_WP_Model
public class Category : INotifyPropertyChanged
{
private string _title;
public event PropertyChangedEventHandler PropertyChanged;
public int Id { get; set; }
public string Title
{
get
{
return this._title;
}
set
{
this._title = value;
this.OnPropertyChanged();
}
}
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
var eventHandler = this.PropertyChanged;
if (eventHandler != null)
{
eventHandler(this, new PropertyChangedEventArgs(propertyName));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment