It depends on whether you want the user to see the shell in the background with the login as a pop up over it, or you want only the login dialog and never show the main window if they don't successfully log in. For the former, you can just trigger showing the dialog from the Loaded event of the main window/shell. If the latter, you can wire it into the Boostrapper CreateShell method. The trick for the latter is knowing that you have to set the Application.Current.MainWindow since that drives the lifetime of the application and WPF automatically sets it to the first window you show, which will be your login dialog window.
↧