Created
February 7, 2017 08:25
-
-
Save jfversluis/fa7b558f97563febc84d4f6ece7c4ebb to your computer and use it in GitHub Desktop.
PageModel for the INotifyPropertyChanged page
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; | |
namespace propertychangedfodysample | |
{ | |
public class propertychangedfodysamplePageModel : INotifyPropertyChanged | |
{ | |
private string _sampleText; | |
public string SampleText { | |
get { return _sampleText; } | |
set { | |
_sampleText = value; | |
OnPropertyChanged (nameof (SampleText)); | |
} | |
} | |
public event PropertyChangedEventHandler PropertyChanged; | |
protected void OnPropertyChanged (string name) | |
{ | |
PropertyChangedEventHandler handler = PropertyChanged; | |
if (handler != null) { | |
handler (this, new PropertyChangedEventArgs (name)); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment