},System.Linq.Expressions.Expression{System.Func{--1,--3}},System.Func{--2,--3},System.Func{--3,--2},System.Reactive.Concurrency.IScheduler,System.String,System.String,System.String,System.Int32)} },System.Linq.Expressions.Expression{System.Func{--1,--3}},ReactiveUI.Binding.IBindingTypeConverter,ReactiveUI.Binding.IBindingTypeConverter,System.Object,System.Reactive.Concurrency.IScheduler,System.String,System.Int32)}
ReactiveSchedulerExtensions.Bind(TView, TViewModel, Expression>, Expression>, Func, Func, IScheduler?, string, string, string, int) method¶
Defined in
Type: ReactiveSchedulerExtensions
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.Reactive.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, net471
Overloads¶
- 1.
public static IReactiveBinding<TView, (object? view, bool isViewModel)> Bind<TViewModel, TView, TVMProp, TVProp>(this TView view, TViewModel viewModel, Expression<Func<TViewModel, TVMProp>> vmProperty, Expression<Func<TView, TVProp>> viewProperty, Func<TVMProp, TVProp> vmToViewConverter, Func<TVProp, TVMProp> viewToVmConverter, IScheduler? scheduler, string vmPropertyExpression = "", string viewPropertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TViewModel : class where TView : class, IViewFor - 2.
public static IReactiveBinding<TView, (object? view, bool isViewModel)> Bind<TViewModel, TView, TVMProp, TVProp>(this TView view, TViewModel viewModel, Expression<Func<TViewModel, TVMProp>> vmProperty, Expression<Func<TView, TVProp>> viewProperty, IBindingTypeConverter vmToViewConverter, IBindingTypeConverter viewToVmConverter, object? conversionHint = null, IScheduler? scheduler = null, string callerFilePath = "", int callerLineNumber = 0) where TViewModel : class where TView : class, IViewFor
1. Overload¶
public static IReactiveBinding<TView, (object? view, bool isViewModel)> Bind<TViewModel, TView, TVMProp, TVProp>(this TView view, TViewModel viewModel, Expression<Func<TViewModel, TVMProp>> vmProperty, Expression<Func<TView, TVProp>> viewProperty, Func<TVMProp, TVProp> vmToViewConverter, Func<TVProp, TVMProp> viewToVmConverter, IScheduler? scheduler, string vmPropertyExpression = "", string viewPropertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TViewModel : class where TView : class, IViewFor
Summary: Creates a two-way binding between a view model property and a view property with conversion functions and a specified scheduler.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model. |
TView | The type of the view. |
TVMProp | The type of the view model property. |
TVProp | The type of the view property. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view to bind to. |
viewModel | TViewModel | The view model to observe. |
vmProperty | Expression | An expression that selects the view model property to observe. |
viewProperty | Expression | An expression that selects the view property to update. |
vmToViewConverter | Func | A function that converts the view model property value to the view property type. |
viewToVmConverter | Func | A function that converts the view property value back to the view model property type. |
scheduler | [IScheduler?](# | The scheduler to use for the binding. |
vmPropertyExpression = "" | string | The caller argument expression for vmProperty. Auto-populated by the compiler. |
viewPropertyExpression = "" | string | The caller argument expression for viewProperty. 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: IReactiveBinding
2. Overload¶
public static IReactiveBinding<TView, (object? view, bool isViewModel)> Bind<TViewModel, TView, TVMProp, TVProp>(this TView view, TViewModel viewModel, Expression<Func<TViewModel, TVMProp>> vmProperty, Expression<Func<TView, TVProp>> viewProperty, IBindingTypeConverter vmToViewConverter, IBindingTypeConverter viewToVmConverter, object? conversionHint = null, IScheduler? scheduler = null, string callerFilePath = "", int callerLineNumber = 0) where TViewModel : class where TView : class, IViewFor
Summary: Creates a two-way binding between a view model property and a view property using explicit IBindingTypeConverter instances.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model. |
TView | The type of the view. |
TVMProp | The type of the view model property. |
TVProp | The type of the view property. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view to bind to. |
viewModel | TViewModel | The view model to observe. |
vmProperty | Expression | An expression that selects the view model property to observe. |
viewProperty | Expression | An expression that selects the view property to update. |
vmToViewConverter | [IBindingTypeConverter](# | The converter for view model-to-view conversion. |
viewToVmConverter | [IBindingTypeConverter](# | The converter for view-to-view model conversion. |
conversionHint = null | object? | An optional hint passed to the converters (e.g., format string). |
scheduler = null | [IScheduler?](# | The scheduler to use for the binding. |
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: IReactiveBinding