I would like to know if is it possible when a user press "back button" to go in a specific pivot or panorama item on WP7 sdk.
Go back in a specific panorama/pivot item?
3k views Asked by user569574 At
2
There are 2 answers
6
On
It would be possible to implement this approach by implementing the OnBackKeyPress
override in your page, however, this would not be consistent with back button behavior in Windows Phone 7 applications. The back button is supposed to only be used for navigating backwards through the application's page stack, and then to leave the application to navigate backwards through the application stack. To implement any other behavior would be counter-intuitive and is also highly likely to fail certification.
You can make sure that the user is always returned to the item they left by overriding the
OnNavigatedFrom
andOnNavigatedTo
events and using thePhonePageApplication.State
property to store the selected item. This will work even if the app is tombstoned while on a different page.Something like:
Please note the above is untested, requires additonal checks and error handling, etc. but should be enough to get you started.