Redigera

Dela via


CurrentChangedEventManager.AddHandler Method

Definition

Adds the specified event handler, which is called when specified source raises the CurrentChanged event.

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

Parameters

source
ICollectionView

The source object that the raises the CurrentChanged event.

handler
EventHandler<EventArgs>

The source object that the raises the CurrentChanged event.

Exceptions

handler is null.

Remarks

Use this method to specify the event handler you want to use to subscribe to the CurrentChanged event. When you use this method, your listener object does not need to implement the IWeakEventListener interface.

Applies to