How to exit a WPF app programmatically?
Posted
by j-t-s
on Stack Overflow
See other posts from Stack Overflow
or by j-t-s
Published on 2010-05-12T15:37:11Z
Indexed on
2010/05/12
15:44 UTC
Read the original article
Hit count: 394
Hi All
In the few years I've been using C# (WINFORMS), I've never used WPF. But now I love WPF, but I don't know how the hell I am supposed to exit my application when the user clicks on the Exit menu item from the File menu. Can somone please help me out!?
I DID google this, and guess what? For such a Simple? thing... Nothing related came up.
Thanks
P.S. I have tried:
this.Dispose();
this.Exit();
Application.ShutDown();
Application.Exit();
Application.Dispose();
... Among many others. Nothing works.
© Stack Overflow or respective owner