WPF App下无法多个窗口按序ShowDialog
原因如下:
http://www.silverlightchina.net/html/study/WPF/2012/0226/14062.html
解决方法:
http://stackoverflow.com/questions/4179758/how-to-detect-that-a-window-has-used-up-its-showdialog-call
最好是使用
Application.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown; var login = new LoginWindow(); login.ShowDialog(); if (null != login.AccountInfo) { this.MainWindow = new MainWindow(login.AccountInfo); this.MainWindow.ShowDialog(); } Application.Current.Shutdown();