实体类绑定TEXTBOX
时间:2010-10-15 来源:whinsh
代码
class Entity:INotifyPropertyChanged
{
private string field;
public string Field
{
get { return field; }
set
{
field = value;
SendChangeInfo("Field");
}
}
private void SendChangeInfo(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
#endregion
}
相关阅读 更多 +