Class ViewExtensions
- Namespace
- Whipstaff.ReactiveUI.Interactions
- Assembly
- Whipstaff.ReactiveUI.dll
Interaction extensions for ReactiveUI.IViewFor.
public static class ViewExtensions
- Inheritance
-
ViewExtensions
- Inherited Members
Methods
BindInteractionDirectToOutputFunc<TViewModel, TView, TInput, TOutput>(TView, TViewModel?, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>, Func<TInput, Task<TOutput>>)
Binds the ReactiveUI.IInteraction<TInput, TOutput> on a ViewModel to the specified handler.
public static IDisposable BindInteractionDirectToOutputFunc<TViewModel, TView, TInput, TOutput>(this TView view, TViewModel? viewModel, Expression<Func<TViewModel, IInteraction<TInput, TOutput>>> propertyName, Func<TInput, Task<TOutput>> outputFunc) where TViewModel : class where TView : class, IViewFor
Parameters
view
TViewThe view to bind to.
viewModel
TViewModelThe view model to bind to.
propertyName
Expression<Func<TViewModel, IInteraction<TInput, TOutput>>>The name of the property on the View Model.
outputFunc
Func<TInput, Task<TOutput>>Function that produces the output to bind.
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.