16

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

Mansuro
  • 4,558
  • 4
  • 36
  • 76
user496949
  • 83,087
  • 147
  • 309
  • 426

2 Answers2

22

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());
Dan Smith
  • 280
  • 3
  • 13
Sankar Ganesh PMP
  • 11,927
  • 11
  • 57
  • 90
7

Use the Application class:

new Application().Run(new SomeWindow());
SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964