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

后端 未结 2 1965
粉色の甜心
粉色の甜心 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条回答
  •  鱼传尺愫
    2020-12-19 10:50

    I have never had luck shutting something down from the start-up. I would suggest starting a new Thread that, after some brief delay, shuts down the application using similar code that you have in your sample.

提交回复
热议问题