Skip to content

},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

View source

Summary: Binds a view-model property one way onto a view property of the same type.

Type parameters

NameDescription
TViewModelThe type declaring the view-model property.
TViewThe type declaring the view property.
TPropThe type of the value carried across the binding.

Parameters

NameTypeDescription
viewTViewThe view being written to.
viewModelTViewModelThe view model being observed.
viewModelPropertyExpression>The property to observe.
viewPropertyExpression>The property to write.
scheduler[IScheduler?](#The sequencer the write is delivered on, or null to write on the thread that owns it.
bindingExpressionstringThe bound expression, named when a write faults.

Returns: IReactiveBinding -- The binding, which disconnects when disposed.

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

View source

Summary: Binds a view-model property one way onto a view property of another type, applying a conversion.

Type parameters

NameDescription
TViewModelThe type declaring the view-model property.
TViewThe type declaring the view property.
TViewModelPropThe type of the view-model property.
TViewPropThe type of the view property.

Parameters

NameTypeDescription
viewTViewThe view being written to.
viewModelTViewModelThe view model being observed.
viewModelPropertyExpression>The property to observe.
viewPropertyExpression>The property to write.
conversionFuncConverts 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.
bindingExpressionstringThe bound expression, named when a write faults.

Returns: IReactiveBinding -- The binding, which disconnects when disposed.

Exceptions

TypeCondition
System.ArgumentNullExceptionconversion is null.