Beispiel #1
0
        public TwoWayBinding(Expression <Func <TLeftMember> > leftTarget, Expression <Func <TRightMember> > rightTarget, Func <TRightMember, TLeftMember> leftValueConverter = null, Func <TLeftMember, TRightMember> rightValueConverter = null, InitialBindingProcedure setupProcedure = InitialBindingProcedure.ApplyLeft)
        {
            this.LeftBinding = new OneWayBinding <TLeftMember, TRightMember>(
                this,
                leftTarget,
                rightTarget,
                leftValueConverter,
                setupProcedure == InitialBindingProcedure.ApplyLeft
                );
            this.Bindings.Add(this.LeftBinding);

            this.RightBinding = new OneWayBinding <TRightMember, TLeftMember>(
                this,
                rightTarget,
                leftTarget,
                rightValueConverter,
                setupProcedure == InitialBindingProcedure.ApplyRight
                );
            this.Bindings.Add(this.RightBinding);
        }
Beispiel #2
0
 public static TwoWayBinding <TLeftMember, TRightMember> CreateTwoWayBinding <TLeftMember, TRightMember>(Expression <Func <TLeftMember> > leftTarget, Expression <Func <TRightMember> > rightTarget, Func <TRightMember, TLeftMember> leftValueConverter = null, Func <TLeftMember, TRightMember> rightValueConverter = null, InitialBindingProcedure setupProcedure = InitialBindingProcedure.ApplyLeft)
 {
     return(new TwoWayBinding <TLeftMember, TRightMember>(leftTarget, rightTarget, leftValueConverter, rightValueConverter, setupProcedure));
 }