共用方式為


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 事件的來源物件。

適用於