-
-
Save jasondown/35cc61282376e5d8ef3766e5ed5ea978 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using System.Runtime.CompilerServices; | |
using Jason.Down.Blog.MutliImageAddinDemo.Annotations; | |
namespace Jason.Down.Blog.MutliImageAddinDemo.ViewModel | |
{ | |
/// <summary> | |
/// This class exposes the default behaviour for INotifyProperyChanged. | |
/// </summary> | |
public class ViewModelBase : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
/// <summary> | |
/// Called when a property in the ViewModel has been changed and wishes to send out a notification. | |
/// </summary> | |
/// <param name="propertyName">Name of the property.</param> | |
[NotifyPropertyChangedInvocator] | |
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) | |
{ | |
PropertyChangedEventHandler handler = PropertyChanged; | |
if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment