I\'m new to Win 8 Metro application development, and discovered that lots of things seem to be changed from the classic WPF.
What troubles me the most is that there\
Try this.. It worked
App.Current.Terminate();
I used crash code to exit Windows 8 Metro APP. char *p = nullptr; *p = 1;
This is what I found to close the app.
App.Current.Exit();
The WinRT reference documentation for the developer preview states that:
CoreApplication.Exit | exit method
Shuts down the app.
Source: http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.core.coreapplication.exit.aspx
As far as I know you can't close a Metro app (by design) (using the Task-Manager is the only option that works) and as far as I know there is no way to exit a Metro app programatically (by design too).
You could try to throw an unhandled exception (I wouldn't recommend that).
You're looking for App.Current.Exit()