WPF Handling crashes more gracefully. [Answered]
I'm currently using this setup which correctly logs and displays feedback correctly, however after the messagebox is closed the application window hangs around for a few seconds completely locked up, calling
.Dispose()
to clean up the NotifyIcon
in the tray more than doubles the time. Is there a way to force the window closed?
9 Replies
When you say Window do you mean that MessageBox ?
nope the application window itself, the messagebox closes correctly
You could loop through all the Application Windows and Hide them
I tried to grab the window from my IoC container and call
.Close()
but that didn't seem to work
just caused the UI to lockup at a different pointNono, Hide, not close
ah hide works, that's weird, thanks!
I guess
Close
tries to call/access stuff that is unavailable whilst the app is crashingA closed window cannot be reopened
A hidden window can be shown again
✅ This post has been marked as answered!