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 best solutions below
1
Matt Lacey
On
You can make sure that the user is always returned to the item they left by overriding the OnNavigatedFrom and OnNavigatedTo events and using the PhonePageApplication.State property to store the selected item. This will work even if the app is tombstoned while on a different page.
Something like:
protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
{
State.Add("selectedPivot", myPivot.SelectedIndex);
base.OnNavigatedFrom(e);
}
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
myPivot.SelectedIndex = (int)State["selectedPivot"];
base.OnNavigatedTo(e);
}
Please note the above is untested, requires additonal checks and error handling, etc. but should be enough to get you started.
Related Questions in SILVERLIGHT
- How to Integrate Snapdeal affiliate api in asp.net application
- How to convert a List<string> to an IEnumerable<ServiceReference.datatable> C# Silverlight WCF RIA Services LINQ to SQL
- Silverlight doesn't have a Uri.IsLoopback property
- Silverlight Nested Custom Controls results in StackOverflowException
- Bootstrap dropdown menu hiding behind Silverlight application embedded using iframe
- Binding BitmapImage to Image on ListBox doesn't work
- Could not load type 'Telerik.Windows.Documents.Packaging.DeflaterOutputStream'
- Insert a blank row into a Datagrid with dynamic columns
- String to Double Conversion (Comma to dot issue)
- Embedded resource image is adding a white dot to my image
- do you have any solution to reduce the build time?
- Style vs inline property setting in silverlight with a custom control
- How Does the Silverlight Client Talk to the Server in a 3 Tier Lightswitch Application?
- Problems to retrieve Image from SQL Server in Silverlight
- Bind DataGrid to List<Dictionary<string,string>>
Related Questions in WINDOWS-PHONE
- Deployment failed because no Windows Phone was detected when using Windows Phone Emulator
- Can I deploy multiple instances of my application on the same windows phone?
- Detect if Application was suspended in OnNavigatedFrom for Windows Phone 8
- Nvigation Windows Phone Apps
- converting string to a double in visual c++ by parsing
- How can I create a simple text file on a windows phone (8.1) that can be accessed trough USB cable?
- Create Page custom animations in Windows Phone 8.1 (Windows Runtime)
- Windows Phone local toast notification Text wrapping and image is not showing
- Windows Phone 8.1 Emulator Xde.exe stops working when clicking on "tools"
- Getting wifi name and other details of wifi in windows phone 8.1
- Impossible to pick video from gallery/library - phonegap/cordova
- How implement a (swipeable) card in windows phone?
- Gapless looping in Background Media Player for Windows Phone 8.1
- Windows Phone asynchronous call terminates
- Can I generate an appx with a windows phone project?
Related Questions in PIVOT
- Why in a pivot the "include new items in manual filter" option is grey out when source is a powerpivot?
- Aggregate, sum and pivot MySQL data
- mysql pivot not counting Date columns
- Pivoting values from datatable
- MySQL span multiple rows in fields
- MySQL some rows to columns
- Pivot each group in Pandas
- (Un)pivoting tables on SQL
- pandas add variables according to variable value
- Pivot sample with dynamic columns
- Filter Pivot in Report Filter for a range of values
- Fetching row data as column names and set as boolean if exists or not
- MySQL: Transform row data to columns
- SQL: Changing structure of sql table with a million rows
- PIVOT giving incorrect output when no of columns increase
Related Questions in BACK-BUTTON
- Back button handler in Cordova Android 4.0.0 App with crosswalk not preventing behavior
- Back Button from Fragment to an another Fragment
- How to change the URL without reloading the page when back button is clicked in angularjs?
- Back pressed events with system alert window
- How to check which Application the user came from after tapping a link (Associated Domains) of my App?
- How can I catch which page is load when the back button click on apache cordova?
- Back button controlling for my Windows Phone 8.1 Silverlight App
- Swift Hides back button
- How to detect browser back button click event using polymer?
- Android Cordova backbutton event Not triggering
- When user logout from page ... if user click browser back button ,which will redirect to previous URL and display HTML page for few seconds
- On Navigation Drawer back button is not working correctly?
- Press Android Back button with appium in -no-window mode
- how to return back to the previous activity
- How to handle back button on Ionic 2
Related Questions in PANORAMA-CONTROL
- Can we customize the default style of hub or panorama app
- WP8 Panorama Style Settings
- Need Panorama App title to be still in Windows Phone 8
- How do I make a wide PanoramaItem always align to left when swiping back?
- Resize image from url for panorama background
- Go back in a specific panorama/pivot item?
- Device motion detection in iOS
- How to set image source in Panorama Control in Windows Phone 7 code behind?
- How do I bind two different data collections into 2 different PanoramaItem listbox?
- How to Navigate to Panorama Item in Code
- Navigate to item 3 from item 1 in Panorama View
- change the position of an Pivot header (Windows phone)
- Mix between Pivot and Panorama for Windows Phone App
- WP7: Can I change font size of Panorama view? in silverlight work
- Change Tone in every panorama item
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It would be possible to implement this approach by implementing the
OnBackKeyPressoverride 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.