Skip to content

Instantly share code, notes, and snippets.

@kkozmic
Created November 30, 2009 20:25
Show Gist options
  • Save kkozmic/245715 to your computer and use it in GitHub Desktop.
Save kkozmic/245715 to your computer and use it in GitHub Desktop.
public class MyObject:INotifyPropertyChanged
{
public ICommand UpdateCommand { get; set; }
private string inputText;
public string InputText
{
get { return inputText; }
set
{
if (value != inputText)
{
PropertyChanged(this, new PropertyChangedEventArgs("InputText"));
}
inputText = value;
}
}
private string outputText;
public string OutputText
{
get { return outputText; }
set
{
if(value!=outputText)
{
PropertyChanged(this, new PropertyChangedEventArgs("OutputText"));
}
outputText = value;
}
}
public event PropertyChangedEventHandler PropertyChanged = delegate { };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment