Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone 7 close application

Is there any possibility to programatically close Silverlight application on Windows Phone 7?

like image 533
asd Avatar asked Sep 07 '10 13:09

asd


People also ask

How do I close multiple windows on my phone?

Here's how to quickly close all active apps: 1 – Press and hold the Home button (the one with the icon that's shaped like a house) until the “Recent Apps” window opens up. 2 – Tap the Task Manager button. 3 – Tap Exit all.

What is the button to close an application?

(eXit button) Also called a "close" or "exit" button, clicking or tapping the X removes the current window, dialog box or popup message from the screen. It is also used to delete text and graphics.

How do I close a window?

If you want to close the active window, you can also click Close Current Window on the File menu or press CTRL+F4.


1 Answers

If you write an XNA Game, you will have access to an explicit Exit() method. If you are writing traditional Silverlight project, then NO, there is no way to programatically close your app. See also Peter Torr's Blog entry on Exiting Silverlight Apps in Windows Phone 7. There he also mentions the option of throwing an unhandled exception, which IMO is a terrible programing style.

An option you may try, is using the WP7 Navigation Service to programatically navigate back out of the application. Not sure if that would work though. Why do you need to Exit?

like image 121
froeschli Avatar answered Sep 20 '22 05:09

froeschli