Reputation: 391
I have a function which displays a window (like a message box) to the user when the application encounters an error and is about to quit (The warning window below).
When debugging in the IDE the main UI thread throws an exception while running the app in the real OS no exception is thrown (like the main thread is stopped as it should which is the desired behavior).
How can I pause or stop the main window from continuing to run? Like the behavior from the wpf toolkit message box which I used previously.
When the modal popup window closes the app will be shutting down.
DockPanel dr = new DockPanel();
WarningWindow.Content = dr;
WarningWindow.Show();
Window WarningWindow = new Window();
WarningWindow.FontFamily = new FontFamily("Calibri");
WarningWindow.FontSize = 12;
WarningWindow.Owner = this;
Upvotes: 0
Views: 43