Skip to content

Instantly share code, notes, and snippets.

@BrunoVT1992
Last active April 26, 2016 07:40
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 BrunoVT1992/dfb30131b9c2e70552a1e79dd0153cf8 to your computer and use it in GitHub Desktop.
Save BrunoVT1992/dfb30131b9c2e70552a1e79dd0153cf8 to your computer and use it in GitHub Desktop.
Mvvm INotifyPropertyChanged implementation
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace Mvvm
{
public class NotifyPropertyChanged : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public void OnPropertyChanged([CallerMemberName]String propertyName = null)
{
var 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