Esempio n. 1
0
        internal PropertyInfo GetMemberAsSource(MemberInfo member, OneWayBinding binding)
        {
            EndpointMember cachedMemberInfo = GetMember(member);

            cachedMemberInfo.SourceBindings.Add(binding);

            return(cachedMemberInfo.Property);
        }
Esempio n. 2
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);
        }