PropertyChangedEventHandler 委托
定义
表示将处理 PropertyChanged 事件的方法,该事件在更改组件上的属性时引发。Represents the method that will handle the PropertyChanged event raised when a property is changed on a component.
public delegate void PropertyChangedEventHandler(System::Object ^ sender, PropertyChangedEventArgs ^ e);
public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e);
public delegate void PropertyChangedEventHandler(object? sender, PropertyChangedEventArgs e);
type PropertyChangedEventHandler = delegate of obj * PropertyChangedEventArgs -> unit
Public Delegate Sub PropertyChangedEventHandler(sender As Object, e As PropertyChangedEventArgs)
参数
- sender
- Object
事件源。The source of the event.
包含事件数据的 PropertyChangedEventArgs。A PropertyChangedEventArgs that contains the event data.
注解
创建 PropertyChangedEventHandler 委托时,需要标识将处理该事件的方法。When you create a PropertyChangedEventHandler delegate, you identify the method that will handle the event. 若要将事件与事件处理程序关联,请将该委托的一个实例添加到事件中。To associate the event with your event handler, add an instance of the delegate to the event. 只要事件发生,就会调用事件处理程序方法,除非删除委托。The event-handler method is called whenever the event occurs, unless you remove the delegate. 有关事件处理程序委托的详细信息,请参阅 处理和引发事件。For more information about event-handler delegates, see Handling and Raising Events.
扩展方法
| GetMethodInfo(Delegate) |
获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate. |