Beispiel #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");
            }
        }
Beispiel #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);
 }
Beispiel #3
0
 public TwoWayBinding(PropertyInfo propertyInfo)
     : this(BindingResolutionMode.Deferred)
 {
     this.oneWayBinding         = new OneWayBinding <T>(propertyInfo);
     this.oneWayToSourceBinding = new OneWayToSourceBinding <T>(propertyInfo);
 }