Last active
April 26, 2016 07:40
-
-
Save BrunoVT1992/dfb30131b9c2e70552a1e79dd0153cf8 to your computer and use it in GitHub Desktop.
Mvvm INotifyPropertyChanged implementation
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; | |
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