Application.Current.Shutdown() is not killing my application

后端 未结 7 836
执念已碎
执念已碎 2021-02-05 03:39

I\'ve just started a new C#/WPF application and am using the NotifyIcon from the WPF Contrib project. I can start the program, add an \"Exit\" MenuItem to the NotifyIcon\'s Cont

7条回答
  •  旧时难觅i
    2021-02-05 04:20

    You coult try Environment.Exit(0); It kills the process with the given exit code. Exit code 0 states the application terminated successfully. It might be more 'rude' or 'not-done' but perhaps this is what you are looking for.

提交回复
热议问题