What is the right way to restart WPF application? [duplicate]

与世无争的帅哥 提交于 2019-12-11 09:48:40

问题


I want to restart my WPF Application programmitically; in windows Forms I used System.Windows.Forms.Application.Restart();

I have tried this :

private void Restart() 
{
    System.Diagnostics.Process.Start(Application.ResourceAssembly.Location); 
    Application.Current.Shutdown(); 
}

I have deployed my application with ClickOnce and its not working there. Any help would be great.

来源:https://stackoverflow.com/questions/23405848/what-is-the-right-way-to-restart-wpf-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!