INotifyPropertyChanged 向客户端发出某一属性值已更改的通知。
namespace System.ComponentModel
{
// Summary:
// Notifies clients that a property value has changed.
public interface INotifyPropertyChanged
{
// Summary:
// Occurs when a property value changes.
event PropertyChangedEventHandler PropertyChanged; 声明event的时候event后面的是delegate, 这里是PropertyChangedEventHandler.
}
}
PropertyChangedEventHandler
namespace System.ComponentModel
{
// Summary:
// Represents the method that will handle the System.ComponentModel.INotifyPropertyChanged.PropertyChanged
// event raised when a property is changed on a component.
//
// Parameters:
// sender:
// The source of the event.
//
// e:
// A System.ComponentModel.PropertyChangedEventArgs that contains the event
// data.
public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e);
}