},System.Linq.Expressions.Expression{System.Func{--1,--2}},System.Reactive.Concurrency.IScheduler,System.String)} },System.Linq.Expressions.Expression{System.Func{--1,--3}},System.Func{--2,--3},System.Reactive.Concurrency.IScheduler,System.String)}
RuntimeBindingFallback.OneWayBind(TView, TViewModel, Expression>, Expression>, IScheduler?, string) method¶
Defined in
Type: RuntimeBindingFallback
Namespace: ReactiveUI.Binding.Reactive.Fallback
Assembly: ReactiveUI.Binding.Reactive.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-tvos18.0, net9.0-maccatalyst18.0, net9.0-ios18.0, net9.0-macos15.0, net9.0-desktop1.0, net8.0, net8.0-macos14.5, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, netstandard2.1, net481, net462, net471
Overloads¶
- 1.
public static IReactiveBinding<TView, TProp> OneWayBind<TViewModel, TView, TProp>(TView view, TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, Expression<Func<TView, TProp>> viewProperty, IScheduler? scheduler, string bindingExpression) where TViewModel : class where TView : IViewFor - 2.
public static IReactiveBinding<TView, TViewProp> OneWayBind<TViewModel, TView, TViewModelProp, TViewProp>(TView view, TViewModel viewModel, Expression<Func<TViewModel, TViewModelProp>> viewModelProperty, Expression<Func<TView, TViewProp>> viewProperty, Func<TViewModelProp, TViewProp> conversion, IScheduler? scheduler, string bindingExpression) where TViewModel : class where TView : IViewFor
1. Overload¶
Attributes: [RequiresUnreferencedCode("Runtime binding fallback resolves the property chain by reflection.")]
public static IReactiveBinding<TView, TProp> OneWayBind<TViewModel, TView, TProp>(TView view, TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, Expression<Func<TView, TProp>> viewProperty, IScheduler? scheduler, string bindingExpression) where TViewModel : class where TView : IViewFor
Summary: Binds a view-model property one way onto a view property of the same type.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type declaring the view-model property. |
TView | The type declaring the view property. |
TProp | The type of the value carried across the binding. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view being written to. |
viewModel | TViewModel | The view model being observed. |
viewModelProperty | Expression | The property to observe. |
viewProperty | Expression | The property to write. |
scheduler | [IScheduler?](# | The sequencer the write is delivered on, or null to write on the thread that owns it. |
bindingExpression | string | The bound expression, named when a write faults. |
Returns: IReactiveBinding
2. Overload¶
Attributes: [RequiresUnreferencedCode("Runtime binding fallback resolves the property chain by reflection.")]
public static IReactiveBinding<TView, TViewProp> OneWayBind<TViewModel, TView, TViewModelProp, TViewProp>(TView view, TViewModel viewModel, Expression<Func<TViewModel, TViewModelProp>> viewModelProperty, Expression<Func<TView, TViewProp>> viewProperty, Func<TViewModelProp, TViewProp> conversion, IScheduler? scheduler, string bindingExpression) where TViewModel : class where TView : IViewFor
Summary: Binds a view-model property one way onto a view property of another type, applying a conversion.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type declaring the view-model property. |
TView | The type declaring the view property. |
TViewModelProp | The type of the view-model property. |
TViewProp | The type of the view property. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view being written to. |
viewModel | TViewModel | The view model being observed. |
viewModelProperty | Expression | The property to observe. |
viewProperty | Expression | The property to write. |
conversion | Func | Converts the observed value to the view's type. |
scheduler | [IScheduler?](# | The sequencer the write is delivered on, or null to write on the thread that owns it. |
bindingExpression | string | The bound expression, named when a write faults. |
Returns: IReactiveBinding
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | conversion is null. |