ViewForMixins.

WhenActivated(IActivatableViewModel, Action<Action<IDisposable>>) Method

Summary

WhenActivated allows you to register a Func to be called when a ViewModel's View is Activated.
Namespace
ReactiveUI
Containing Type
ViewForMixins

Syntax

public static void WhenActivated(this IActivatableViewModel item, Action<Action<IDisposable>> block)

Parameters

Name Type Description
item IActivatableViewModel Object that supports activation.
block Action<Action<IDisposable>> The method to be called when the corresponding View is activated. The Action parameter (usually called 'd') allows you to register Disposables to be cleaned up when the View is deactivated (i.e. "d(someObservable.Subscribe());").

Return Value

Type Description
void