}},System.Func{ReactiveUI.Binding.IInteractionContext{--2,--3},System.Threading.Tasks.Task},System.String,System.String,System.Int32)} }},System.Func{ReactiveUI.Binding.IInteractionContext{--2,--3},System.IObservable{--4}},System.String,System.String,System.Int32)}
ReactiveUIBindingExtensions.BindInteraction(TView, TViewModel?, Expression>>, Func, Task>, string, string, int) method¶
Defined in
Type: ReactiveUIBindingExtensions
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
Overloads¶
- 1.
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, string propertyNameExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TViewModel : class where TView : class, IViewFor - 2.
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, string propertyNameExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TViewModel : class where TView : class, IViewFor
1. Overload¶
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, string propertyNameExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TViewModel : class where TView : class, IViewFor
Summary: Binds a task-based handler to an interaction exposed by the view model.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model. |
TView | The type of the view. |
TInput | The type of the interaction's input. |
TOutput | The type of the interaction's output. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view that provides the handler. |
viewModel | TViewModel? | The view model that exposes the interaction. |
propertyName | Expression | An expression that selects the interaction property on the view model. |
handler | Func | A task-based handler for the interaction. |
propertyNameExpression = "" | string | The caller argument expression for propertyName. Auto-populated by the compiler. |
callerFilePath = "" | string | The source file path of the caller. Auto-populated by the compiler. |
callerLineNumber = 0 | int | The source line number of the caller. Auto-populated by the compiler. |
Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.
2. Overload¶
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, string propertyNameExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TViewModel : class where TView : class, IViewFor
Summary: Binds an observable-based handler to an interaction exposed by the view model.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model. |
TView | The type of the view. |
TInput | The type of the interaction's input. |
TOutput | The type of the interaction's output. |
TDontCare | The signal type of the observable handler. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view that provides the handler. |
viewModel | TViewModel? | The view model that exposes the interaction. |
propertyName | Expression | An expression that selects the interaction property on the view model. |
handler | Func | An observable-based handler for the interaction. |
propertyNameExpression = "" | string | The caller argument expression for propertyName. Auto-populated by the compiler. |
callerFilePath = "" | string | The source file path of the caller. Auto-populated by the compiler. |
callerLineNumber = 0 | int | The source line number of the caller. Auto-populated by the compiler. |
Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.