Bewerken

Delen via


CurrentChangingEventManager.AddHandler Method

Definition

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

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

Parameters

source
ICollectionView

The source object that the raises the CurrentChanging event.

handler
EventHandler<CurrentChangingEventArgs>

The delegate that handles the CurrentChanging event.

Exceptions

handler is null.

Remarks

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

Applies to