Is there any possibility to programatically close Silverlight application on Windows Phone 7?
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.
(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.
If you want to close the active window, you can also click Close Current Window on the File menu or press CTRL+F4.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With