},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})}
PropertyBinderImplementation.OneWayBind(TViewModel?, TView, Expression>, Expression>) method¶
Defined in
Type: PropertyBinderImplementation
Namespace: ReactiveUI.Reactive
Assembly: ReactiveUI.Reactive.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.
public 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.
public 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.
public 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.
public 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.
public 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¶
public 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
Inherited documentation
These docs were inherited from IPropertyBinderImplementation. The member doesn't override them on this type.
Summary: Creates a one-way binding from view model to view using default converters and conversion hint.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model that is bound. |
TView | The type of the view that is bound. |
TViewModelPropertyType | The type of the property bound on the view model. |
TViewPropertyType | The type of the property bound on the view. |
Parameters
| Name | Type | Description |
|---|---|---|
viewModel | TViewModel? | The instance of the view model to bind to. |
view | TView | The instance of the view to bind to. |
viewModelProperty | Expression | An expression representing the property to be bound on the view model. |
viewProperty | Expression | An expression representing the property to be bound on the view. |
Returns: IReactiveBinding
2. Overload¶
public 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
Inherited documentation
These docs were inherited from IPropertyBinderImplementation. The member doesn't override them on this type.
Summary: Creates a one-way binding from view model to view with an optional converter override and default conversion hint.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model that is bound. |
TView | The type of the view that is bound. |
TViewModelPropertyType | The type of the property bound on the view model. |
TViewPropertyType | The type of the property bound on the view. |
Parameters
| Name | Type | Description |
|---|---|---|
viewModel | TViewModel? | The instance of the view model to bind to. |
view | TView | The instance of the view to bind to. |
viewModelProperty | Expression | An expression representing the property to be bound on the view model. |
viewProperty | Expression | 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
3. Overload¶
public 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
Inherited documentation
These docs were inherited from IPropertyBinderImplementation. The member doesn't override them on this type.
Summary: Creates a one-way binding from view model to view using only a conversion hint.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model that is bound. |
TView | The type of the view that is bound. |
TViewModelPropertyType | The type of the property bound on the view model. |
TViewPropertyType | The type of the property bound on the view. |
Parameters
| Name | Type | Description |
|---|---|---|
viewModel | TViewModel? | The instance of the view model to bind to. |
view | TView | The instance of the view to bind to. |
viewModelProperty | Expression | An expression representing the property to be bound on the view model. |
viewProperty | Expression | An expression representing the property to be bound on the view. |
conversionHint | object? | An object that can provide a hint for the converter. |
Returns: IReactiveBinding
4. Overload¶
public 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
Inherited documentation
These docs were inherited from IPropertyBinderImplementation. The member doesn't override them on this type.
Summary: Creates a one-way binding from view model to view with an optional converter override.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model that is bound. |
TView | The type of the view that is bound. |
TViewModelPropertyType | The type of the property bound on the view model. |
TViewPropertyType | The type of the property bound on the view. |
Parameters
| Name | Type | Description |
|---|---|---|
viewModel | TViewModel? | The instance of the view model to bind to. |
view | TView | The instance of the view to bind to. |
viewModelProperty | Expression | An expression representing the property to be bound on the view model. |
viewProperty | Expression | An expression representing the property to be bound on the view. |
conversionHint | object? | 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
5. Overload¶
public 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
Inherited documentation
These docs were inherited from IPropertyBinderImplementation. The member doesn't override them on this type.
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
| Name | Description |
|---|---|
TViewModel | The type of the view model that is bound. |
TView | The type of the view that is bound. |
TProp | The type of the property bound on the view model. |
TOut | The return type of the selector. |
Parameters
| Name | Type | Description |
|---|---|---|
viewModel | TViewModel? | The instance of the view model to bind to. |
view | TView | The instance of the view to bind to. |
viewModelProperty | Expression | 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. |
viewProperty | Expression | 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. |
selector | Func | A 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