Skip to content

Instantly share code, notes, and snippets.

@abdelkader
Created November 15, 2010 00:09
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 abdelkader/676249 to your computer and use it in GitHub Desktop.
Save abdelkader/676249 to your computer and use it in GitHub Desktop.
Binding
public class Customer : INotifyPropertyChanged
{
...
private string _name;
public string Name
{
get { return _name; }
set {
if (value != _name)
{
_name = value;
NotifyPropertyChanged("Name");
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment