Table of Contents

Event CurrentChanging

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

Raise this event before change of current item pointer. Handlers can cancel the change.

event CurrentChangingEventHandler CurrentChanging

Returns

CurrentChangingEventHandler
Raise this event before change of current item pointer. Handlers can cancel the change.

Remarks

Classes implementing ICollectionView should use the following pattern:

Raise the CurrentChanging event before any change of currency and check the return value before proceeding and raising CurrentChanged event:

void MoveCurrentToNext()
{
    CurrentChangingEventArgs args = new CurrentChangingEventArgs();
    OnCurrentChanging(args);
    if (!args.Cancel)
    {
        // ... update private data structures ...
        CurrentChanged();
    }
}