The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

InteractionBindingMixins.

BindInteraction<TViewModel, TView, TInput, TOutput>(TView, TViewModel?, Expression<Func<TViewModel, Interaction<TInput, TOutput>>>, Func<InteractionContext<TInput, TOutput>, Task>) Method

Summary

Binds the Interaction<TInput, TOutput> on a ViewModel to the specified handler.
Namespace
ReactiveUI
Containing Type
InteractionBindingMixins

Syntax

public static IDisposable BindInteraction<TViewModel, TView, TInput, TOutput>(this TView view, TViewModel? viewModel, Expression<Func<TViewModel, Interaction<TInput, TOutput>>> propertyName, Func<InteractionContext<TInput, TOutput>, Task> handler) 
    where TViewModel : class where TView : class, IViewFor

Type Parameters

Name Description
TViewModel The type of the view model.
TView The type of the view being bound.
TInput The interaction's input type.
TOutput The interaction's output type.

Parameters

Name Type Description
view TView The view to bind to.
viewModel TViewModel? The view model to bind to.
propertyName Expression<Func<TViewModel, Interaction<TInput, TOutput>>> The name of the property on the View Model.
handler Func<InteractionContext<TInput, TOutput>, Task> The handler.

Return Value

Type Description
IDisposable An object that when disposed, disconnects the binding.