CollectionChangedEventManager.AddHandler 方法

定义

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

public:
 static void AddHandler(System::Collections::Specialized::INotifyCollectionChanged ^ source, EventHandler<System::Collections::Specialized::NotifyCollectionChangedEventArgs ^> ^ handler);
public static void AddHandler (System.Collections.Specialized.INotifyCollectionChanged source, EventHandler<System.Collections.Specialized.NotifyCollectionChangedEventArgs> handler);
static member AddHandler : System.Collections.Specialized.INotifyCollectionChanged * EventHandler<System.Collections.Specialized.NotifyCollectionChangedEventArgs> -> unit
Public Shared Sub AddHandler (source As INotifyCollectionChanged, handler As EventHandler(Of NotifyCollectionChangedEventArgs))

参数

source
INotifyCollectionChanged

引发 CollectionChanged 事件的源对象。

适用于