WPF ShutdownMode and MainWindow: why the app exits when the login window closes
A WPF login window shown from OnStartup can silently end the whole app the moment it closes. The article measures why OnMainWindowClose fails as well and proposes an OnExplicitShutdown startup sequence instead.