Skip to content

},System.Linq.Expressions.Expression{System.Func{--1,--2}},System.Reactive.Concurrency.IScheduler,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.Reactive.Concurrency.IScheduler,System.String,System.String,System.String,System.Int32)} },System.Linq.Expressions.Expression{System.Func{--2,--3}},ReactiveUI.Binding.IBindingTypeConverter,ReactiveUI.Binding.IBindingTypeConverter,System.Object,System.Reactive.Concurrency.IScheduler,System.String,System.Int32)}

ReactiveSchedulerExtensions.BindTwoWay(TSource, TTarget, Expression>, Expression>, IScheduler?, string, string, string, int) method

Defined in

Type: ReactiveSchedulerExtensions Namespace: ReactiveUI.Binding Assembly: ReactiveUI.Binding.Reactive.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, net471

Overloads

  • 1. public static IDisposable BindTwoWay<TSource, TTarget, TProperty>(this TSource source, TTarget target, Expression<Func<TSource, TProperty>> sourceProperty, Expression<Func<TTarget, TProperty>> targetProperty, IScheduler? scheduler, 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, IScheduler? scheduler, string sourcePropertyExpression = "", string targetPropertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TSource : class where TTarget : class
  • 3. public static IDisposable BindTwoWay<TSource, TSourceProp, TTarget, TTargetProp>(this TSource source, TTarget target, Expression<Func<TSource, TSourceProp>> sourceProperty, Expression<Func<TTarget, TTargetProp>> targetProperty, IBindingTypeConverter sourceToTargetConverter, IBindingTypeConverter targetToSourceConverter, object? conversionHint = null, IScheduler? scheduler = null, 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, IScheduler? scheduler, string sourcePropertyExpression = "", string targetPropertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TSource : class where TTarget : class

View source

Summary: Creates a two-way binding between a source property and a target property with a specified scheduler.

Type parameters

NameDescription
TSourceThe type of the source object.
TTargetThe type of the target object.
TPropertyThe type of the property being bound.

Parameters

NameTypeDescription
sourceTSourceThe source object to observe for property changes.
targetTTargetThe target object whose property will be updated.
sourcePropertyExpression>An expression that selects the source property to observe.
targetPropertyExpression>An expression that selects the target property to update.
scheduler[IScheduler?](#The scheduler to use for the binding.
sourcePropertyExpression = ""stringThe caller argument expression for sourceProperty. Auto-populated by the compiler.
targetPropertyExpression = ""stringThe caller argument expression for targetProperty. Auto-populated by the compiler.
callerFilePath = ""stringThe source file path of the caller. Auto-populated by the compiler.
callerLineNumber = 0intThe 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, IScheduler? scheduler, string sourcePropertyExpression = "", string targetPropertyExpression = "", string callerFilePath = "", int callerLineNumber = 0) where TSource : class where TTarget : class

View source

Summary: Creates a two-way binding between a source property and a target property with conversion functions and a specified scheduler.

Type parameters

NameDescription
TSourceThe type of the source object.
TSourcePropThe type of the source property.
TTargetThe type of the target object.
TTargetPropThe type of the target property.

Parameters

NameTypeDescription
sourceTSourceThe source object to observe for property changes.
targetTTargetThe target object whose property will be updated.
sourcePropertyExpression>An expression that selects the source property to observe.
targetPropertyExpression>An expression that selects the target property to update.
sourceToTargetConvFuncA function that converts the source property value to the target property type.
targetToSourceConvFuncA function that converts the target property value back to the source property type.
scheduler[IScheduler?](#The scheduler to use for the binding.
sourcePropertyExpression = ""stringThe caller argument expression for sourceProperty. Auto-populated by the compiler.
targetPropertyExpression = ""stringThe caller argument expression for targetProperty. Auto-populated by the compiler.
callerFilePath = ""stringThe source file path of the caller. Auto-populated by the compiler.
callerLineNumber = 0intThe 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 BindTwoWay<TSource, TSourceProp, TTarget, TTargetProp>(this TSource source, TTarget target, Expression<Func<TSource, TSourceProp>> sourceProperty, Expression<Func<TTarget, TTargetProp>> targetProperty, IBindingTypeConverter sourceToTargetConverter, IBindingTypeConverter targetToSourceConverter, object? conversionHint = null, IScheduler? scheduler = null, string callerFilePath = "", int callerLineNumber = 0) where TSource : class where TTarget : class

View source

Summary: Creates a two-way binding between a source property and a target property using explicit IBindingTypeConverter instances.

Type parameters

NameDescription
TSourceThe type of the source object.
TSourcePropThe type of the source property.
TTargetThe type of the target object.
TTargetPropThe type of the target property.

Parameters

NameTypeDescription
sourceTSourceThe source object to observe for property changes.
targetTTargetThe target object whose property will be updated.
sourcePropertyExpression>An expression that selects the source property to observe.
targetPropertyExpression>An expression that selects the target property to update.
sourceToTargetConverter[IBindingTypeConverter](#The converter for source-to-target conversion.
targetToSourceConverter[IBindingTypeConverter](#The converter for target-to-source conversion.
conversionHint = nullobject?An optional hint passed to the converters (e.g., format string).
scheduler = null[IScheduler?](#The scheduler to use for the binding.
callerFilePath = ""stringThe source file path of the caller. Auto-populated by the compiler.
callerLineNumber = 0intThe source line number of the caller. Auto-populated by the compiler.

Returns: IDisposable -- A disposable that, when disposed, disconnects the binding.