コード例 #1
0
 private ValueAccessorChangingEventArgs RaiseValueChanging(IDataContext context, object penultimateValue,
     IBindingMemberInfo lastMember, object oldValue, object newValue)
 {
     var valueChanging = ValueChanging;
     if (valueChanging == null)
         return null;
     var args = new ValueAccessorChangingEventArgs(context, penultimateValue, lastMember, oldValue, newValue);
     valueChanging(this, args);
     return args;
 }
コード例 #2
0
 public void RaiseValueChanging(ValueAccessorChangingEventArgs e)
 {
     var handler = ValueChanging;
     if (handler != null) handler(this, e);
 }
コード例 #3
0
 private void SourceOnValueChanging(IBindingSourceAccessor sender, ValueAccessorChangingEventArgs args)
 {
     if (args.Cancel)
         return;
     object value = Binding.TargetAccessor.Source.GetPathMembers(false).PenultimateValue;
     if (value != null && !value.IsUnsetValue())
         args.Cancel = (bool)_member.GetValue(value, null);
 }