【发布时间】:2021-09-01 08:52:28
【问题描述】:
我无法在关闭主窗口时关闭我的 WPF 应用程序。将新窗口(启动画面)添加到我的项目后就遇到了这个问题。 下面是App.xaml.cs中新增的代码
SplashScreen splash = new SplashScreen();
splash.Show();
MainWindow main = new MainWindow();
this.MainWindow = main;
Thread.Sleep(2000);
splash.Close();
【问题讨论】:
标签: wpf splash-screen mainwindow