How to Terminate WP8 Application Programmatically?

This small tips & tricks will help you to terminate your running Windows Phone 8 application forcefully. Though this is not a common practice, but you may want this in some scenario. - Article authored by Kunal Chowdhury on

Though it’s not the common practice in Windows Phone application development, but you may want to terminate your Application programmatically on some special occasions. These occasions may vary in different cases.


In this post, we will learn how to kill the application programmatically so that, it should not reside in the memory unnecessarily when user hits back to come out from the application.


We all already know that, Windows Phone application stays in the memory and goes to suspended state when user hits hardware back button, start button or the search button. If you are building any banking application or any kind of secure application and wants to terminate the application forcefully when the user hits any one of them, you can use this trick.


To terminate the application completely, you just have to call the following API:




This will terminate the running application completely and the user will not be able to come back to the app by pressing the hardware back button. The place to call this API may vary depending upon your requirement. But make sure to save important data, if any, before forcefully terminating the application.

Article authored by Kunal Chowdhury on
Kunal Chowdhury is a Microsoft Windows Insider MVP, and Content Creator. He publishes latest tech news, articles, and reviews on that has 2 million+ monthly views. DM him on if you want to discuss on any business collaboration opportunities.

Join Us