CurrentChangedEventManager::AddHandler Method (ICollectionView^, EventHandler<EventArgs^>^)

.NET Framework (current version)
 

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

Namespace:   System.ComponentModel
Assembly:  WindowsBase (in WindowsBase.dll)

public:
static void AddHandler(
	ICollectionView^ source,
	EventHandler<EventArgs^>^ handler
)

Parameters

source
Type: System.ComponentModel::ICollectionView^

The source object that the raises the CurrentChanged event.

handler
Type: System::EventHandler<EventArgs^>^

The source object that the raises the CurrentChanged event.

Exception Condition
ArgumentNullException

handler is null.

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.

.NET Framework
Available since 4.5
Return to top
Show: