Closing an application on Windows Phone 7

342195 pts.
Tags:
Microsoft Silverlight
Mobile
Windows Phone 7
Can someone tell me if it's possible to actually programatically close a Silverlight application on Windows Phone 7? Thank you so much.

Answer Wiki

Thanks. We'll let you know when a new response is added.

It is possible, but it is usually not recommended.  Microsoft decided not to include an API for that, so if you want to do it, you have to use methods that were not designed for that purpose.

One option could be to manipulate the back stack, removing all entries until the application exits.

Another option would to throw an exception and not handling it.  This will cause your application to get killed.

In Windows Phone 8, though, an Application.Terminate() method was introduced, for those cases where there is really a need to terminate an application programmatically.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following