Application.Current.Shutdown(-1) not closing WPF app

后端 未结 2 1949
粉色の甜心
粉色の甜心 2020-12-19 10:22

I am checking if the windows authenticated user is a valid user for my wpf application or not.

If not, I need to shut down the application; but even after executing

2条回答
  •  萌比男神i
    2020-12-19 10:54

    Use Environment.Exit() instead. That will try to shut down gracefully, but if it can't gracefully, will shut down rudely -- forcefully terminating threads.

提交回复
热议问题