Created
November 15, 2010 00:09
-
-
Save abdelkader/676249 to your computer and use it in GitHub Desktop.
Binding
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
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