I have a WPF
window, I want to know if I can start it from a console programmatically?
When a Window is created at run-time using the Window object, it is not visible by default. To make it visible, we can use Show or ShowDialog method. Show method of Window class is responsible for displaying a window.
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());
Use the Application
class:
new Application().Run(new SomeWindow());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With