},System.Linq.Expressions.Expression{System.Func{--1,--2}},System.String,System.String,System.String,System.Int32)} },System.Linq.Expressions.Expression{System.Func{--2,--3}},System.Func{--1,--3},System.Func{--3,--1},System.String,System.String,System.String,System.Int32)}
ReactiveUIBindingExtensions.BindTwoWay(TSource, TTarget, Expression>, Expression>, string, 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 BindTwoWay<TSource, TTarget, TProperty>(this TSource source, TTarget target, Expression<Func<TSource, TProperty>> sourceProperty, Expression<Func<TTarget, TProperty>> targetProperty, string sourcePropertyExpression = "", string targetPropertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TSource : class where TTarget : class - 2.
public static IDisposable BindTwoWay<TSource, TSourceProp, TTarget, TTargetProp>(this TSource source, TTarget target, Expression<Func<TSource, TSourceProp>> sourceProperty, Expression<Func<TTarget, TTargetProp>> targetProperty, Func<TSourceProp, TTargetProp> sourceToTargetConv, Func<TTargetProp, TSourceProp> targetToSourceConv, string sourcePropertyExpression = "", string targetPropertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TSource : class where TTarget : class
1. Overload¶
public static IDisposable BindTwoWay<TSource, TTarget, TProperty>(this TSource source, TTarget target, Expression<Func<TSource, TProperty>> sourceProperty, Expression<Func<TTarget, TProperty>> targetProperty, string sourcePropertyExpression = "", string targetPropertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TSource : class where TTarget : class
Summary: Creates a two-way binding between a source property and a target property.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the source object. |
TTarget | The type of the target object. |
TProperty | The type of the property being bound. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TSource | The source object to observe for property changes. |
target | TTarget | The target object whose property will be updated. |
sourceProperty | Expression | An expression that selects the source property to observe. |
targetProperty | Expression | An expression that selects the target property to update. |
sourcePropertyExpression = "" | string | The caller argument expression for sourceProperty. Auto-populated by the compiler. |
targetPropertyExpression = "" | string | The caller argument expression for targetProperty. 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 BindTwoWay<TSource, TSourceProp, TTarget, TTargetProp>(this TSource source, TTarget target, Expression<Func<TSource, TSourceProp>> sourceProperty, Expression<Func<TTarget, TTargetProp>> targetProperty, Func<TSourceProp, TTargetProp> sourceToTargetConv, Func<TTargetProp, TSourceProp> targetToSourceConv, string sourcePropertyExpression = "", string targetPropertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TSource : class where TTarget : class
Summary: Creates a two-way binding between a source property and a target property with conversion functions.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the source object. |
TSourceProp | The type of the source property. |
TTarget | The type of the target object. |
TTargetProp | The type of the target property. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TSource | The source object to observe for property changes. |
target | TTarget | The target object whose property will be updated. |
sourceProperty | Expression | An expression that selects the source property to observe. |
targetProperty | Expression | An expression that selects the target property to update. |
sourceToTargetConv | Func | A function that converts the source property value to the target property type. |
targetToSourceConv | Func | A function that converts the target property value back to the source property type. |
sourcePropertyExpression = "" | string | The caller argument expression for sourceProperty. Auto-populated by the compiler. |
targetPropertyExpression = "" | string | The caller argument expression for targetProperty. 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.