1.将原来的窗体关闭事件 OnClosed内部的逻辑写在App.xaml.cs中

        protected override void OnExit(ExitEventArgs e)
        {
            // base.OnExit(e);
            Application.Current.Shutdown();//先停止线程,然后终止进程.
            Environment.Exit(0);//直接终止进程.
        }

 

相关文章:

  • 2021-12-02
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
相关资源
相似解决方案