Every time I build my application, I have to use ALT+F4 to close it and then switch from metro mode to regular mode and it was getting annoying. So, I added a button on the UI (temporarily while building and testing my app) and on that I added exit application functionality.
To close an app in code, all we need to do is, get the current application context and call the Exit method.
The following code snippet will do the trick:
App.Current.Exit();

Gowtham RajamanickamTOP 100Posted Apr 6, 2016, 11:01 PM EDT
good one..
Upendra Pratap ShahiPosted Jun 18, 2015, 12:24 AM EDT
good..