HomeWindowsHow to Terminate the WP8 Application Programmatically using C#?

How to Terminate the WP8 Application Programmatically using C#?

If you want to terminate your Windows Phone 8 programmatically using C#, you can do it using the below code snippet.

Application.Current.Terminate ();

How to Terminate the WP8 Application Programmatically using C#?

When using this method, one should be careful because this method cannot generally be used to provide the “exit” mechanism for the app like the back key and also that the Application.Current.Terminate method does not raise any application lifecycle events. This method will just terminate thye current process.

This might make the developers work difficult In case some code on saving of data is written in the Application Closing event.

The developer must explicitly save the state of the windows phone application before calling this method.

 

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...