问题补充:
public class Person : INotifyPropertyChanged
{
private string firstNameValue;
public string FirstName{
get { return firstNameValue; }
set
{
firstNameValue=value;
// Call NotifyPropertyChanged when the property is updated
NotifyPropertyChanged("FirstName");
}
}
// Declare the PropertyChanged event
public event PropertyChangedEventHandler PropertyChanged;
// NotifyPropertyChanged will raise the PropertyChanged event passing the
// source property that is being updated.
public void NotifyPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
是 这个NotifyPropertyChanged 函数吗?哪位高人给我讲一讲啊。