public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { LoginWindow l = new LoginWindow(); Nullable<bool> dialogResult = l.ShowDialog(); base.OnStartup(e); BootStrapper bootStrapper = new BootStrapper(); bootStrapper.Run(); }*Without* the LoginWindow dialog the BootStrapper (the usual - based on UnityBootStrapper) fires up fine. With the LoginWindow code in place it goes through the same process without error but when the Application.OnStartup exits the whole app exits. If I place the LoginWindow code *after* the bootStrapper.Run() line everything works fine (but I don't want to have the Shell displayed before the log in stuff has completed).