Skip to content

},System.Linq.Expressions.Expression{System.Func{--2,--3}},System.Func{--1,--3},System.Func{--3,--1},System.Reactive.Concurrency.IScheduler)} },System.Linq.Expressions.Expression{System.Func{--2,--1}},System.Reactive.Concurrency.IScheduler)}

BindExtensions.BindTwoWay(TFrom, TTarget, Expression>, Expression>, Func, Func, IScheduler) method

Defined in

Type: BindExtensions Namespace: ReactiveMarbles.PropertyChanged Assembly: ReactiveMarbles.PropertyChanged.dll

Applies to

netstandard2.0, net462

Overloads

  • 1. public static IDisposable BindTwoWay<TFrom, TFromProperty, TTarget, TTargetProperty>(this TFrom fromObject, TTarget targetObject, Expression<Func<TFrom, TFromProperty>> fromProperty, Expression<Func<TTarget, TTargetProperty>> toProperty, Func<TFromProperty, TTargetProperty> hostToTargetConv, Func<TTargetProperty, TFromProperty> targetToHostConv, IScheduler scheduler = null) where TFrom : class, INotifyPropertyChanged where TTarget : class, INotifyPropertyChanged
  • 2. public static IDisposable BindTwoWay<TFrom, TProperty, TTarget>(this TFrom fromObject, TTarget targetObject, Expression<Func<TFrom, TProperty>> fromProperty, Expression<Func<TTarget, TProperty>> toProperty, IScheduler scheduler = null) where TFrom : class, INotifyPropertyChanged where TTarget : class, INotifyPropertyChanged

1. Overload

public static IDisposable BindTwoWay<TFrom, TFromProperty, TTarget, TTargetProperty>(this TFrom fromObject, TTarget targetObject, Expression<Func<TFrom, TFromProperty>> fromProperty, Expression<Func<TTarget, TTargetProperty>> toProperty, Func<TFromProperty, TTargetProperty> hostToTargetConv, Func<TTargetProperty, TFromProperty> targetToHostConv, IScheduler scheduler = null) where TFrom : class, INotifyPropertyChanged where TTarget : class, INotifyPropertyChanged

Summary: Performs one way binding between a property on the host to a target property.

Type parameters

NameDescription
TFromThe type of property the host is.
TFromPropertyThe property from type.
TTargetThe target property.
TTargetPropertyThe property to type.

Parameters

NameTypeDescription
fromObjectTFromThe object which contains the host property.
targetObjectTTargetThe object which contains the target property.
fromPropertyExpression>A expression to the host property.
toPropertyExpression>A expression to the target property.
hostToTargetConvFuncA converter which will convert the property from the host to the target property.
targetToHostConvFuncA converter which will convert the property from the target to the host property.
scheduler = null[IScheduler](#A scheduler for performing the binding on. Defaults to ImmediateScheduler.

Returns: IDisposable -- A disposable which when disposed the binding will stop.

Exceptions

TypeCondition
System.ArgumentExceptionIf there is a invalid expression.

2. Overload

public static IDisposable BindTwoWay<TFrom, TProperty, TTarget>(this TFrom fromObject, TTarget targetObject, Expression<Func<TFrom, TProperty>> fromProperty, Expression<Func<TTarget, TProperty>> toProperty, IScheduler scheduler = null) where TFrom : class, INotifyPropertyChanged where TTarget : class, INotifyPropertyChanged

Summary: Performs one way binding between a property on the host to a target property.

Type parameters

NameDescription
TFromThe type of property the host is.
TPropertyThe property from type.
TTargetThe target property.

Parameters

NameTypeDescription
fromObjectTFromThe object which contains the host property.
targetObjectTTargetThe object which contains the target property.
fromPropertyExpression>A expression to the host property.
toPropertyExpression>A expression to the target property.
scheduler = null[IScheduler](#A scheduler for performing the binding on. Defaults to ImmediateScheduler.

Returns: IDisposable -- A disposable which when disposed the binding will stop.

Exceptions

TypeCondition
System.ArgumentExceptionIf there is a invalid expression.