Skip to content

Instantly share code, notes, and snippets.

@sttrox
Last active March 16, 2019 13:58
Show Gist options
  • Save sttrox/f47578100f914f39958c2ef33115d1ae to your computer and use it in GitHub Desktop.
Save sttrox/f47578100f914f39958c2ef33115d1ae to your computer and use it in GitHub Desktop.
Implemented INotifyPropertyChanged
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Define a Property Notification</Title>
<Shortcut>imppc</Shortcut>
<Description>Code snippet to generate implemented INotifyPropertyChanged</Description>
<Author>V</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="csharp">
<![CDATA[
#region System
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#endregion
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment