Пример #1
0
            public Pipe(BindableObject srcObj, BindableProperty srcProperty, BindableObject destObj, BindableProperty destProperty, BindingDirection bindingDirection)
            {
                if (null == srcObj || null == destObj)
                {
                    throw (new global::System.Exception("Src obj and dest obj can't be null"));
                }

                if (null == srcProperty || null == destProperty)
                {
                    throw (new global::System.Exception("Src property and dest property can't be null"));
                }

                this.srcObj  = srcObj;
                this.destObj = destObj;

                this.srcProperty  = srcProperty;
                this.destProperty = destProperty;

                srcObj.ListenPropertyChange(srcProperty, SrcObjPropertyChanged);

                if (BindingDirection.TwoWay == bindingDirection)
                {
                    destObj.ListenPropertyChange(destProperty, DestObjPropertyChanged);
                }
            }