/// <summary> /// Called when PropertyValue get or set fails. Default implementation raises the /// PropertyValueException event. /// </summary> /// <param name="e">PropertyValueExceptionEventArgs</param> /// <exception cref="ArgumentNullException">When e is null</exception> protected virtual void OnPropertyValueException(PropertyValueExceptionEventArgs e) { if (e == null) { throw FxTrace.Exception.ArgumentNull("e"); } if (PropertyValueException != null) { PropertyValueException(this, e); } }
// <summary> // Called when there is an error setting or getting a PropertyValue. // Displays an error dialog. // </summary> // <param name="e"></param> protected override void OnPropertyValueException(PropertyValueExceptionEventArgs e) { if (e.Source == PropertyValueExceptionSource.Set) { if (e.Exception != null) { Debug.WriteLine(e.Exception.ToString()); } ErrorReporting.ShowErrorMessage(e.Exception.Message); base.OnPropertyValueException(e); } else { base.OnPropertyValueException(e); } }
/// <summary> /// Called when PropertyValue get or set fails. Default implementation raises the /// PropertyValueException event. /// </summary> /// <param name="e">PropertyValueExceptionEventArgs</param> /// <exception cref="ArgumentNullException">When e is null</exception> protected virtual void OnPropertyValueException(PropertyValueExceptionEventArgs e) { if (e == null) throw FxTrace.Exception.ArgumentNull("e"); if (PropertyValueException != null) PropertyValueException(this, e); }