How to start the WPF window from console programmatically?

后端 未结 2 2021
悲哀的现实
悲哀的现实 2020-12-03 21:01

I have a WPF window, I want to know if I can start it from a console programmatically?

相关标签:
2条回答
  • 2020-12-03 21:36

    Hi You can use Application Class, with the help of this class,we can start wpf window programmatically,

    Application app = new Application ();
    app.Run(new Window1());
    
    0 讨论(0)
  • 2020-12-03 21:41

    Use the Application class:

    new Application().Run(new SomeWindow());
    
    0 讨论(0)
提交回复
热议问题