,--1,System.Linq.Expressions.Expression{System.Func{--1,--2}},System.String,System.String,System.Int32)} ,--1,System.Linq.Expressions.Expression{System.Func{--1,--2}},System.Object,System.String,System.String,System.Int32)} ,--1,System.Linq.Expressions.Expression{System.Func{--1,--2}},ReactiveUI.Binding.IBindingTypeConverter,System.String,System.String,System.Int32)} ,--1,System.Linq.Expressions.Expression{System.Func{--1,--2}},System.Object,ReactiveUI.Binding.IBindingTypeConverter,System.String,System.String,System.Int32)}
ReactiveUIBindingExtensions.BindTo(IObservable, TTarget?, Expression>, string, string, int) method¶
Defined in
Type: ReactiveUIBindingExtensions
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
Overloads¶
- 1.
public static IDisposable BindTo<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, string propertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TTarget : class - 2.
public static IDisposable BindTo<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, object? conversionHint, string propertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TTarget : class - 3.
public static IDisposable BindTo<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, IBindingTypeConverter? converterOverride, string propertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TTarget : class - 4.
public static IDisposable BindTo<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, object? conversionHint, IBindingTypeConverter? converterOverride, string propertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TTarget : class
1. Overload¶
public static IDisposable BindTo<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, string propertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TTarget : class
Summary:
Applies an observable stream to a target property. Conceptually similar to
source.Subscribe(x => target.property = x).
Type parameters
| Name | Description |
|---|---|
TValue | The type of the value produced by the source observable. |
TTarget | The type of the target object. |
TTargetValue | The type of the property on the target object. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The observable stream to bind to a target property. |
target | TTarget? | The target object whose property will be set. |
property | Expression | An expression that selects the target property to set. |
propertyExpression = "" | string | The caller argument expression for property. Auto-populated by the compiler. |
callerFilePath = "" | string | The source file path of the caller. Auto-populated by the compiler. |
callerLineNumber = 0 | int | The source line number of the caller. Auto-populated by the compiler. |
Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.
2. Overload¶
public static IDisposable BindTo<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, object? conversionHint, string propertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TTarget : class
Summary: Applies an observable stream to a target property, using the supplied conversion hint when a converter is required to coerce the source value to the target property type.
Type parameters
| Name | Description |
|---|---|
TValue | The type of the value produced by the source observable. |
TTarget | The type of the target object. |
TTargetValue | The type of the property on the target object. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The observable stream to bind to a target property. |
target | TTarget? | The target object whose property will be set. |
property | Expression | An expression that selects the target property to set. |
conversionHint | object? | An object that provides a hint to the converter. The semantics are defined by the converter. |
propertyExpression = "" | string | The caller argument expression for property. Auto-populated by the compiler. |
callerFilePath = "" | string | The source file path of the caller. Auto-populated by the compiler. |
callerLineNumber = 0 | int | The source line number of the caller. Auto-populated by the compiler. |
Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.
3. Overload¶
public static IDisposable BindTo<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, IBindingTypeConverter? converterOverride, string propertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TTarget : class
Summary: Applies an observable stream to a target property, using the supplied converter to coerce the source value to the target property type.
Type parameters
| Name | Description |
|---|---|
TValue | The type of the value produced by the source observable. |
TTarget | The type of the target object. |
TTargetValue | The type of the property on the target object. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The observable stream to bind to a target property. |
target | TTarget? | The target object whose property will be set. |
property | Expression | An expression that selects the target property to set. |
converterOverride | [IBindingTypeConverter?](# | An explicit converter to use when converting the source value to the target property type. |
propertyExpression = "" | string | The caller argument expression for property. Auto-populated by the compiler. |
callerFilePath = "" | string | The source file path of the caller. Auto-populated by the compiler. |
callerLineNumber = 0 | int | The source line number of the caller. Auto-populated by the compiler. |
Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.
4. Overload¶
public static IDisposable BindTo<TValue, TTarget, TTargetValue>(this IObservable<TValue> source, TTarget? target, Expression<Func<TTarget, TTargetValue?>> property, object? conversionHint, IBindingTypeConverter? converterOverride, string propertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TTarget : class
Summary: Applies an observable stream to a target property, using the supplied converter and conversion hint to coerce the source value to the target property type.
Type parameters
| Name | Description |
|---|---|
TValue | The type of the value produced by the source observable. |
TTarget | The type of the target object. |
TTargetValue | The type of the property on the target object. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The observable stream to bind to a target property. |
target | TTarget? | The target object whose property will be set. |
property | Expression | An expression that selects the target property to set. |
conversionHint | object? | An object that provides a hint to the converter. The semantics are defined by the converter. |
converterOverride | [IBindingTypeConverter?](# | An explicit converter to use when converting the source value to the target property type. |
propertyExpression = "" | string | The caller argument expression for property. Auto-populated by the compiler. |
callerFilePath = "" | string | The source file path of the caller. Auto-populated by the compiler. |
callerLineNumber = 0 | int | The source line number of the caller. Auto-populated by the compiler. |
Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.