I'm not sure I understand that WinForms approach solves.
Isn't it better to always do this:
Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs) e.Cancel = True Me.Hide() End Sub
And then install this in your application?
Application.Current.ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
This way, whenever your child windows close, you save them for faster display later, but your application still shuts down when the main window closes (i.e. exit, shutdown, etc.).
source share