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}},ReactiveUI.Binding.Reactive.Fallback.TwoWayConverterPair{--2,--3},System.Reactive.Concurrency.IScheduler,System.String)}

RuntimeBindingFallback.Bind(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, BindingChange> Bind<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 : class, IViewFor
  • 2. public static IReactiveBinding<TView, BindingChange> Bind<TViewModel, TView, TViewModelProp, TViewProp>(TView view, TViewModel viewModel, Expression<Func<TViewModel, TViewModelProp>> viewModelProperty, Expression<Func<TView, TViewProp>> viewProperty, TwoWayConverterPair<TViewModelProp, TViewProp> converters, IScheduler? scheduler, string bindingExpression) where TViewModel : class where TView : class, IViewFor

1. Overload

Attributes: [RequiresUnreferencedCode("Runtime binding fallback resolves the property chain by reflection.")]

public static IReactiveBinding<TView, BindingChange> Bind<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 : class, IViewFor

View source

Summary: Binds a view-model property and a view property of the same type to each other.

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 side of the binding.
viewModelTViewModelThe view-model side of the binding.
viewModelPropertyExpression>The property on viewModel.
viewPropertyExpression>The property on view.
scheduler[IScheduler?](#The sequencer the view 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 both directions when disposed.

2. Overload

Attributes: [RequiresUnreferencedCode("Runtime binding fallback resolves the property chain by reflection.")]

public static IReactiveBinding<TView, BindingChange> Bind<TViewModel, TView, TViewModelProp, TViewProp>(TView view, TViewModel viewModel, Expression<Func<TViewModel, TViewModelProp>> viewModelProperty, Expression<Func<TView, TViewProp>> viewProperty, TwoWayConverterPair<TViewModelProp, TViewProp> converters, IScheduler? scheduler, string bindingExpression) where TViewModel : class where TView : class, IViewFor

View source

Summary: Binds a view-model property and a view property of differing types, converting in both directions.

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 side of the binding.
viewModelTViewModelThe view-model side of the binding.
viewModelPropertyExpression>The property on viewModel.
viewPropertyExpression>The property on view.
converters[TwoWayConverterPair](#Converts view model to view, and view back to view model.
scheduler[IScheduler?](#The sequencer the view 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 both directions when disposed.

Exceptions

TypeCondition
System.ArgumentNullExceptionconverters is null.