In WP7 and WP8 I just needed to clear the backstack in a page, then press Back button and the app is closed. In WP8.1 I do Frame.BackStack.Clear(), press Back and the app just minimizes.. How to kill it with Back button?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You can add, in your main page definition:
Then
Warning: As others said, you should not use this and let the system handle the app closure. For example, if you use the Application Insights, I found that they are not sent to Azure when in Release mode
MSDN recommends to not close apps in Windows 8.1:
https://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx#close
you can simply create a button by using XAML and then add this code into your Main page xaml.cs
I think the above has been depreceated. Exit is now an event.
Try
Application.Current.Terminate();