ViewForMixins.

WhenActivated(IActivatableView, Func<IEnumerable<IDisposable>>, IViewFor) Method

Summary

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

Syntax

public static IDisposable WhenActivated(this IActivatableView item, Func<IEnumerable<IDisposable>> block, IViewFor view)

Parameters

Name Type Description
item IActivatableView Object that supports activation.
block Func<IEnumerable<IDisposable>> The method to be called when the corresponding View is activated. It returns a list of Disposables that will be cleaned up when the View is deactivated.
view IViewFor The IActivatableView will ordinarily also host the View Model, but in the event it is not, a class implementing IViewFor can be supplied here.

Return Value

Type Description
IDisposable A Disposable that deactivates this registration.