private void OnPropertyValueException(object sender, PropertyValueExceptionEventArgs e) { int num = (int)this.resourceEntryNode.ViewModel.DesignerContext.MessageDisplayService.ShowMessage(new MessageBoxArgs() { Message = string.Format((IFormatProvider)CultureInfo.InvariantCulture, StringTable.InvalidPropertyValueErrorMessage, new object[1] { (object)e.Exception.Message }), Button = MessageBoxButton.OK, Image = MessageBoxImage.Hand }); this.exceptionOccurred = true; }
// <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); } }