},System.Linq.Expressions.Expression{System.Func{--1,--3}})} },System.Linq.Expressions.Expression{System.Func{--1,--3}},System.Func{--2,--3})}
ReactiveUIBindingExtensions.OneWayBindUnsafe(TView, TViewModel, Expression>, Expression>) method¶
Defined in
Type: ReactiveUIBindingExtensions
Namespace: ReactiveUI.Binding.Reactive
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, TVProp> OneWayBindUnsafe<TViewModel, TView, TVMProp, TVProp>(this TView view, TViewModel viewModel, Expression<Func<TViewModel, TVMProp>> viewModelProperty, Expression<Func<TView, TVProp>> viewProperty) where TViewModel : class where TView : class, IViewFor - 2.
public static IReactiveBinding<TView, TOut> OneWayBindUnsafe<TViewModel, TView, TProp, TOut>(this TView view, TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, Expression<Func<TView, TOut>> viewProperty, Func<TProp, TOut> selector) where TViewModel : class where TView : class, IViewFor
1. Overload¶
Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]
public static IReactiveBinding<TView, TVProp> OneWayBindUnsafe<TViewModel, TView, TVMProp, TVProp>(this TView view, TViewModel viewModel, Expression<Func<TViewModel, TVMProp>> viewModelProperty, Expression<Func<TView, TVProp>> viewProperty) where TViewModel : class where TView : class, IViewFor
Summary: Creates a one-way binding from a view model property to a view property.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model. |
TView | The type of the view. |
TVMProp | The type of the view model property. |
TVProp | The type of the view property. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view to bind to. |
viewModel | TViewModel | The view model to observe. |
viewModelProperty | Expression | An expression that selects the view model property to observe. |
viewProperty | Expression | An expression that selects the view property to update. |
Returns: IReactiveBinding
Remarks
Resolves the property chain by reflection, for an expression the generator could not read.
2. Overload¶
Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]
public static IReactiveBinding<TView, TOut> OneWayBindUnsafe<TViewModel, TView, TProp, TOut>(this TView view, TViewModel viewModel, 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 from a view model property to a view property with a specified selector.
Type parameters
| Name | Description |
|---|---|
TViewModel | The type of the view model. |
TView | The type of the view. |
TProp | The type of the view model property. |
TOut | The type of the view property. |
Parameters
| Name | Type | Description |
|---|---|---|
view | TView | The view to bind to. |
viewModel | TViewModel | The view model to observe. |
viewModelProperty | Expression | An expression that selects the view model property to observe. |
viewProperty | Expression | An expression that selects the view property to update. |
selector | Func | A function that converts the view model property value to the view property type. |
Returns: IReactiveBinding
Remarks
Resolves the property chain by reflection, for an expression the generator could not read.