I have a WPF
window, I want to know if I can start it from a console programmatically?
我有一个WPF窗口,我想知道我是否可以通过编程方式从控制台启动它?
2 个解决方案
#1
19
Hi You can use Application Class, with the help of this class,we can start wpf window programmatically,
您好您可以使用Application Class,在这个类的帮助下,我们可以通过编程方式启动wpf窗口,
Application app = new Application ();
app.Run(new Window1());
#1
19
Hi You can use Application Class, with the help of this class,we can start wpf window programmatically,
您好您可以使用Application Class,在这个类的帮助下,我们可以通过编程方式启动wpf窗口,
Application app = new Application ();
app.Run(new Window1());