Skip to content

},System.Linq.Expressions.Expression{System.Func{--1,--3}})} },System.Linq.Expressions.Expression{System.Func{--1,--3}},ReactiveUI.IBindingTypeConverter)} },System.Linq.Expressions.Expression{System.Func{--1,--3}},System.Object)} },System.Linq.Expressions.Expression{System.Func{--1,--3}},System.Object,ReactiveUI.IBindingTypeConverter)} },System.Linq.Expressions.Expression{System.Func{--1,--3}},System.Func{--2,--3})}

IPropertyBinderImplementation.OneWayBind(TViewModel?, TView, Expression>, Expression>) method

Defined in

Type: IPropertyBinderImplementation Namespace: ReactiveUI Assembly: ReactiveUI.Core.dll

Applies to

net10.0, net10.0-maccatalyst26.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-tvos26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net10.0-ios26.0, net10.0-android36.0, net9.0, net9.0-tvos18.0, net9.0-macos15.0, net9.0-maccatalyst18.0, net9.0-windows10.0.19041, net9.0-ios18.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.5, netstandard2.1, net481, net462, net471

Overloads

  • 1. IReactiveBinding<TView, TViewPropertyType> OneWayBind<TViewModel, TView, TViewModelPropertyType, TViewPropertyType>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TViewModelPropertyType?>> viewModelProperty, Expression<Func<TView, TViewPropertyType>> viewProperty) where TViewModel : class where TView : class, IViewFor
  • 2. IReactiveBinding<TView, TViewPropertyType> OneWayBind<TViewModel, TView, TViewModelPropertyType, TViewPropertyType>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TViewModelPropertyType?>> viewModelProperty, Expression<Func<TView, TViewPropertyType>> viewProperty, IBindingTypeConverter? viewModelToViewConverterOverride) where TViewModel : class where TView : class, IViewFor
  • 3. IReactiveBinding<TView, TViewPropertyType> OneWayBind<TViewModel, TView, TViewModelPropertyType, TViewPropertyType>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TViewModelPropertyType?>> viewModelProperty, Expression<Func<TView, TViewPropertyType>> viewProperty, object? conversionHint) where TViewModel : class where TView : class, IViewFor
  • 4. IReactiveBinding<TView, TViewPropertyType> OneWayBind<TViewModel, TView, TViewModelPropertyType, TViewPropertyType>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TViewModelPropertyType?>> viewModelProperty, Expression<Func<TView, TViewPropertyType>> viewProperty, object? conversionHint, IBindingTypeConverter? viewModelToViewConverterOverride) where TViewModel : class where TView : class, IViewFor
  • 5. IReactiveBinding<TView, TOut> OneWayBind<TViewModel, TView, TProp, TOut>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TProp>> viewModelProperty, Expression<Func<TView, TOut>> viewProperty, Func<TProp, TOut> selector) where TViewModel : class where TView : class, IViewFor

1. Overload

IReactiveBinding<TView, TViewPropertyType> OneWayBind<TViewModel, TView, TViewModelPropertyType, TViewPropertyType>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TViewModelPropertyType?>> viewModelProperty, Expression<Func<TView, TViewPropertyType>> viewProperty) where TViewModel : class where TView : class, IViewFor

Summary: Creates a one-way binding from view model to view using default converters and conversion hint.

Type parameters

NameDescription
TViewModelThe type of the view model that is bound.
TViewThe type of the view that is bound.
TViewModelPropertyTypeThe type of the property bound on the view model.
TViewPropertyTypeThe type of the property bound on the view.

Parameters

NameTypeDescription
viewModelTViewModel?The instance of the view model to bind to.
viewTViewThe instance of the view to bind to.
viewModelPropertyExpression>An expression representing the property to be bound on the view model.
viewPropertyExpression>An expression representing the property to be bound on the view.

Returns: IReactiveBinding -- An instance of IDisposable that, when disposed, disconnects the binding.

2. Overload

IReactiveBinding<TView, TViewPropertyType> OneWayBind<TViewModel, TView, TViewModelPropertyType, TViewPropertyType>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TViewModelPropertyType?>> viewModelProperty, Expression<Func<TView, TViewPropertyType>> viewProperty, IBindingTypeConverter? viewModelToViewConverterOverride) where TViewModel : class where TView : class, IViewFor

Summary: Creates a one-way binding from view model to view with an optional converter override and default conversion hint.

Type parameters

NameDescription
TViewModelThe type of the view model that is bound.
TViewThe type of the view that is bound.
TViewModelPropertyTypeThe type of the property bound on the view model.
TViewPropertyTypeThe type of the property bound on the view.

Parameters

NameTypeDescription
viewModelTViewModel?The instance of the view model to bind to.
viewTViewThe instance of the view to bind to.
viewModelPropertyExpression>An expression representing the property to be bound on the view model.
viewPropertyExpression>An expression representing the property to be bound on the view.
viewModelToViewConverterOverride[IBindingTypeConverter?](#An optional converter to use when converting from view model to view property.

Returns: IReactiveBinding -- An instance of IDisposable that, when disposed, disconnects the binding.

3. Overload

IReactiveBinding<TView, TViewPropertyType> OneWayBind<TViewModel, TView, TViewModelPropertyType, TViewPropertyType>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TViewModelPropertyType?>> viewModelProperty, Expression<Func<TView, TViewPropertyType>> viewProperty, object? conversionHint) where TViewModel : class where TView : class, IViewFor

Summary: Creates a one-way binding from view model to view using only a conversion hint.

Type parameters

NameDescription
TViewModelThe type of the view model that is bound.
TViewThe type of the view that is bound.
TViewModelPropertyTypeThe type of the property bound on the view model.
TViewPropertyTypeThe type of the property bound on the view.

Parameters

NameTypeDescription
viewModelTViewModel?The instance of the view model to bind to.
viewTViewThe instance of the view to bind to.
viewModelPropertyExpression>An expression representing the property to be bound on the view model.
viewPropertyExpression>An expression representing the property to be bound on the view.
conversionHintobject?An object that can provide a hint for the converter.

Returns: IReactiveBinding -- An instance of IDisposable that, when disposed, disconnects the binding.

4. Overload

IReactiveBinding<TView, TViewPropertyType> OneWayBind<TViewModel, TView, TViewModelPropertyType, TViewPropertyType>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TViewModelPropertyType?>> viewModelProperty, Expression<Func<TView, TViewPropertyType>> viewProperty, object? conversionHint, IBindingTypeConverter? viewModelToViewConverterOverride) where TViewModel : class where TView : class, IViewFor

Summary: Creates a one-way binding from view model to view with an optional converter override.

Type parameters

NameDescription
TViewModelThe type of the view model that is bound.
TViewThe type of the view that is bound.
TViewModelPropertyTypeThe type of the property bound on the view model.
TViewPropertyTypeThe type of the property bound on the view.

Parameters

NameTypeDescription
viewModelTViewModel?The instance of the view model to bind to.
viewTViewThe instance of the view to bind to.
viewModelPropertyExpression>An expression representing the property to be bound on the view model.
viewPropertyExpression>An expression representing the property to be bound on the view.
conversionHintobject?An object that can provide a hint for the converter.
viewModelToViewConverterOverride[IBindingTypeConverter?](#An optional converter to use when converting from view model to view property.

Returns: IReactiveBinding -- An instance of IDisposable that, when disposed, disconnects the binding.

5. Overload

IReactiveBinding<TView, TOut> OneWayBind<TViewModel, TView, TProp, TOut>(TViewModel? viewModel, TView view, Expression<Func<TViewModel, TProp>> viewModelProperty, Expression<Func<TView, TOut>> viewProperty, Func<TProp, TOut> selector) where TViewModel : class where TView : class, IViewFor

Summary: Creates a one way binding with a selector, i.e. a binding that flows from the viewModel to the view only, and where the value of the view model property is mapped through the selector before being set to the view.

Type parameters

NameDescription
TViewModelThe type of the view model that is bound.
TViewThe type of the view that is bound.
TPropThe type of the property bound on the view model.
TOutThe return type of the selector.

Parameters

NameTypeDescription
viewModelTViewModel?The instance of the view model to bind to.
viewTViewThe instance of the view to bind to.
viewModelPropertyExpression>An expression representing the property to be bound to on the view model. This can be a child property, for example x => x.Foo.Bar.Baz in which case the binding will attempt to subscribe recursively to updates in order to always get the last value of the property chain.
viewPropertyExpression>An expression representing the property to be bound to on the view. This can be a child property, for example x => x.Foo.Bar.Baz in which case the binding will attempt to subscribe recursively to updates in order to always set the correct property.
selectorFuncA function that will be used to transform the values of the property on the view model before being bound to the view property.

Returns: IReactiveBinding -- An instance of IDisposable that, when disposed, disconnects the binding.