|First, I think you should call the base
OnClosing method, not the
OnClosed as you do. Second, you should call this base handler in both cases, as it will take care with proper action, whether or not event has been cancelled:
var result =
Properties.Resources.MainWindowMsgBox3 + Environment.NewLine +
Properties.Resources.MainWindowMsgBox4 + Environment.NewLine + Environment.NewLine +
Properties.Resources.MainWindowMsgBox6, MessageBoxButton.YesNo, MessageBoxImage.Question,
Log.Info("User engaged Application Closure Event");
Log.Info("Main Window Closing");
e.Cancel = true;
The whole point of setting the
Cancel property is to let the base handler know which action to take (close or cancel).
Hope this helps.
"I'm neither for nor against, on the contrary." John Middle