How to Exit windows phone 7 app? [duplicate] - windows-phone-7

This question already has answers here:
Closed 12 years ago.
Possible Duplicates:
Windows Phone 7 close application
Close a WP7 application programatically?
Is there a way to programmatically quit my App? (Windows Phone 7)
Hi All,
Is there any way to exit application in windows phone 7. My problem with EULA.xaml and MainPage.xaml is solved but have to exit my app on MainPage.xaml in either of the cases.
Thanks in advance.

There is no standard API to do this in WP7-Silverlight. The trick is that you can throw an un-handled exception and that can cause the app to break and go to start menu of WindowsPhone.
public class ExitException :Exception {}
and throw this where ever you want to quit.
throw new ExitException();

This is what you need

Related

UI Automation doesn't work in Windows Phone 8 app.

I developed an app for Windows Phone 8 some time ago. The client wants the app to be accessible for Blind users.
I have given "AutomationProperties.Name" values to all the app elements, but Narrator doesn't detect the elements at all. It detects the main window of the app but none of its containers and items.
I made a new app and narrator detects all the controls I put in there.
I have not been able to find any help on this topic anywhere and any help will be highly appreciated.
Apparently Windows 8 doesn't support this feature. I upgraded my target OS to 8.1 and narrator is working just fine.

Use Windows 8 WinJS code for Window Phone 8

Is there a way to re-use Windows 8 WinJS code for Window Phone 8 (for receiving push). Whether MPNS is supported from WinJS rather than C#.
Any Suggestions or Code Snippet is highly appreciated.
Thanks in advance.

Include Windows 8 namespace in Windows Phone 8 [duplicate]

I am trying to write a Windows Phone 8 SDK-based application. I keep seeing mention of a ProgressRing control but I don't see it in the Toolbox or in the xaml designer.
How do I use this?
ProgressRing is part of the Win8 UI controls, not WP8. In WP8 you should use SystemTray.ProgressIndicator instead which is part of the windows phone UI shell. See here and here for samples.
See below blog link for simple copy&paste code to exactly replicate the Windows ProgressRing (uses the actual style code). Works perfectly, just added it to my WP8 project:
http://briandunnington.github.io/progressring-wp8.html
There is more info about adapting it to WP8 in the answer to this question:
How to Use ProgressRing in Windows Phone 8
Download this app for your phone to see it in action.
ProgressRing is not available for Windows Phone 7 or 8, you have to use ProgressBar or rather the PerformanceProgressBar:
http://www.windowsphonegeek.com/articles/WP7-PerformanceProgressBar-in-depth

How to finalize a debug session after a windows phone app has been closed?

Each time when a windows phone app has been closed the associated debug session under VS 2010 was closed too. That scenario has been working perfect until Windows 8 + WP SDK 8 was installed.
Now a debug session is not finalized under an emulator neither under a device.
Is it possible to fix this issue?
It's a feature. The debugger remains attached to the app to allow you to easily debug background tasks. Just press the "stop" button to dettach the debugger.
More explanations here: http://blogs.msdn.com/b/visualstudio/archive/2012/08/23/new-visual-studio-2012-debugging-features-for-the-windows-8-app-lifecycle-model.aspx
I'm currently unaware of any way to disable that feature.

How do I get the virtual keyboard in Windows Phone 7?

I've read that this is not possible but that was from a discussion from about 4 months ago. Some Windows Phone 7 games do display the keyboard so surely it must be doable now?
edit: just to clarify I want to show it in an XNA application.
You can use the Guide.BeginShowKeyboardInput method.
In addition to the MSDN docs there is an blog post showing usage at http://luisguerrero.net/en/2010/07/17/how-to-access-to-keyboard-in-xna-from-windows-phone-7/

Resources