Table of Contents

Class InteractionBindingMixins

Namespace
ReactiveUI
Assembly
ReactiveUI.dll

This class provides extension methods for the ReactiveUI view binding mechanism.

public static class InteractionBindingMixins : Object
Inheritance
InteractionBindingMixins

Methods

BindInteraction<TViewModel, TView, TInput, TOutput>(TView, TViewModel?, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>, Func<IInteractionContext<TInput, TOutput>, Task>)

Binds the IInteraction<TInput, TOutput> on a ViewModel to the specified handler.

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

Parameters

view TView

The view to bind to.

viewModel TViewModel

The view model to bind to.

propertyName Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>

The name of the property on the View Model.

handler Func<IInteractionContext<TInput, TOutput>, Task>

The handler.

Returns

IDisposable

An object that when disposed, disconnects the binding.

Type Parameters

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.

BindInteraction<TViewModel, TView, TInput, TOutput, TDontCare>(TView, TViewModel?, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>, Func<IInteractionContext<TInput, TOutput>, IObservable<TDontCare>>)

Binds the IInteraction<TInput, TOutput> on a ViewModel to the specified handler.

public static IDisposable BindInteraction<TViewModel, TView, TInput, TOutput, TDontCare>(this TView view, TViewModel? viewModel, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>> propertyName, Func<IInteractionContext<TInput, TOutput>, IObservable<TDontCare>> handler) where TViewModel : class where TView : class, IViewFor

Parameters

view TView

The view to bind to.

viewModel TViewModel

The view model to bind to.

propertyName Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>

The name of the property on the View Model.

handler Func<IInteractionContext<TInput, TOutput>, IObservable<TDontCare>>

The handler.

Returns

IDisposable

An object that when disposed, disconnects the binding.

Type Parameters

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.

TDontCare

The interaction's signal type.