예제 #1
0
        protected TwoWayBinding(
            OneWayBinding <T> oneWayBinding,
            OneWayToSourceBinding <T> oneWayToSourceBinding,
            BindingResolutionMode resolutionMode)
            : this(resolutionMode)
        {
            this.oneWayBinding         = oneWayBinding;
            this.oneWayToSourceBinding = oneWayToSourceBinding;

            if (this.oneWayBinding.ResolutionMode != this.oneWayToSourceBinding.ResolutionMode)
            {
                throw new ArgumentException("Both bindings must share the same ResolutionMode");
            }
        }
예제 #2
0
 public TwoWayBinding(object source, PropertyInfo propertyInfo)
     : this(BindingResolutionMode.Immediate)
 {
     this.oneWayBinding         = new OneWayBinding <T>(source, propertyInfo);
     this.oneWayToSourceBinding = new OneWayToSourceBinding <T>(source, propertyInfo);
 }
예제 #3
0
 public TwoWayBinding(PropertyInfo propertyInfo)
     : this(BindingResolutionMode.Deferred)
 {
     this.oneWayBinding         = new OneWayBinding <T>(propertyInfo);
     this.oneWayToSourceBinding = new OneWayToSourceBinding <T>(propertyInfo);
 }