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; }
public void RaiseValueChanging(ValueAccessorChangingEventArgs e) { var handler = ValueChanging; if (handler != null) handler(this, e); }
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); }