ErrorsChangedEventManager.AddHandler 方法

定义

添加指定的事件处理程序,当指定的源引发 ErrorsChanged 事件时进行调用。

public:
 static void AddHandler(System::ComponentModel::INotifyDataErrorInfo ^ source, EventHandler<System::ComponentModel::DataErrorsChangedEventArgs ^> ^ handler);
public static void AddHandler (System.ComponentModel.INotifyDataErrorInfo source, EventHandler<System.ComponentModel.DataErrorsChangedEventArgs> handler);
static member AddHandler : System.ComponentModel.INotifyDataErrorInfo * EventHandler<System.ComponentModel.DataErrorsChangedEventArgs> -> unit
Public Shared Sub AddHandler (source As INotifyDataErrorInfo, handler As EventHandler(Of DataErrorsChangedEventArgs))

参数

source
INotifyDataErrorInfo

引发 ErrorsChanged 事件的源对象。

handler
EventHandler<DataErrorsChangedEventArgs>

委托处理 ErrorsChanged 事件。

例外

handlernull

适用于