user496949
user496949

Reputation: 86185

How to start the WPF window from console programmatically?

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

Upvotes: 17

Views: 11404

Answers (2)

Sankar Ganesh PMP
Sankar Ganesh PMP

Reputation: 12037

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());

Upvotes: 23

SLaks
SLaks

Reputation: 888177

Use the Application class:

new Application().Run(new SomeWindow());

Upvotes: 7

Related Questions