How to quit a wp7 app? [duplicate] - windows-phone-7

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Windows Phone 7 close application
I have an app which needs quiting from the MainPage but just using NavigationService.GoBack() won't work when another screen has navigated to that main page as I don't want the ability to go back to that previous page.
Would I have to set a variable in App.xaml.cs called backToBeginning and all the onnavigatedto callbacks will GoBack() if that is set? or is that too messy?

WP7 does not support exiting of apps. Just let the user do it with the back button.

Currently, there is no way to achieve this. What you have described is really needed in the Music+Video hub, but due to inability to to it with the way navigation in WP7 is organized, even Microsoft had to sacrifice the functionality of a very important build-in application.

Related

Windows Phone - Tombstoning [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
WP7: Is it possible to intercept the backstack before the journal thumbnail is created/stored
I have an app with personal data that should not be displayed in the task viewer of WP8 when the app is send to background.
My idea was to raise a black page in the Application_Deactivated event, but the UI only seems to update when the app is reactivated again, in the task viewer is still the old UI.
Do you have any ideas/solutions for this problem?
This is not possible. There is no lifecycle event that you can 'hook into' before your application 'screenshot' is obtained for the fast-app switching UI. You are going to have to re-think your application.
However, +1 for actually coming up with a reasonable scenario for wanting to achieve this

How to customize the full page of a listpicker? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
ListPicker FullMode Selected Item Color
I've a long list of things loading from a listpicker, mostly "useless".
Is there the possibility to add a button on top of the full page opened when I click the listpicker (so when I click on it I only show the most useful things?
Thanks a lot!
In order to do that you will have to create a copy of the ListPickerPage.xaml file from the Silverlight for Windows Phone Toolkit in your application, change it to meet your requirements, and then on your ListPicker control set the PickerPageUri proprety to the new ListPickerPage.xaml

WP7 navigate back from other application automatically

I am trying to automate testing of WP7 apps. In my app, one functionality is CALL; ie; the page changes to WP's phone call page. While testing I want it to automatically come back from the phone call page to simulate a "back" press. I know we can use navigation service to perform back - press however I want to use the back-press on a different page which is not under my control(ie; default phone call page). Is there any way of achieving this?
NO, Current that is not supported in the WP7.
Even if any hacks make it possible also, your application doesn't meet the certification requirements.
So no point, in making this.

How to handle first run and splashes in WP7

I have spent a bit of time rummaging through Stack Overflow to find out how to deterministically close an application based on an action. Most if not all answers say you can't or shouldn't do it. If this is so I would like to phrase my question differently and see how people are handling two issues I am having trouble with.
Just to let you guys know I am using Caliburn.Micro for this project.
Ok so the flow of my app can be broken down into two parts, the initial flow and the standard flow, these are as follows
Splash -> Welcome -> CreateAccount -> MainHub (all other functionality branches from here)
Splash -> MainHub (all other functionality branches from here)
Based on this flow, the feedback from my better (beta) testers is that they expect to exit the app on pressing the back button on the hub, which they see as the entry point. Currently as per navigation they go all the way back to the splash.
I see other apps have this functionality, but without forcing the application to close (Which I read is a no no) how are they achieving this desired functionality.
NOTE: I do not want to put in an exit button as I believe it goes against the natural flow of a WP7 application.
First of all, you cannot add a exit button. The only way to exit a application is to crash it, which will not be approved for marketplace certification.
As for your problem, you simply have to remove views from the navigation stack upon completion of a known navigation.
For this, use NavigationService.RemoveBackEntry.
You can access the NavigationService from anywhere, using this snippet:
(App.Current.RootVisual as PhoneApplicationFrame).RemoveBackEntry()
Regarding EULA / Login screens (and Splash) - don't make them into pages. If you instead make them Popup or Dialog controls you can show or hide them at any time (on first navigation; when the user hits a "protected" part of the app; after a time-out; etc.) and they don't consume a slot in the backstack.
Source: http://blogs.msdn.com/b/ptorr/archive/2010/08/01/exiting-a-windows-phone-application.aspx

A way to copy to click board for wp7? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
using Clipboard in WP7 programming
For example you have a long text in a textblock and you want to have a button to automatically copy and paste the large text onto your clipboard so you can paste it in word mobile or some other app. Is there a way to do this?
There is no copy-paste API in windows phone 7 now. Maybe it'll appear in Mango.
The Windows phone team have recently blogged about their work adding clipboard functionality to the next release of the OS. So you'll have to wait until then.
Please see:
using Clipboard in WP7 programming
and
How to paste a text from textbox to some other application without using SIP?

Resources