I know how to navigate from one rotation element to another, on a summary page, but what if navigation starts from another page entirely?
UPDATE:
Here is the solution I used based on Matt Lacy's answer:
From the button click event on MainPage:
private void button_Click(object sender, RoutedEventArgs e) { string parameter = "myPivotItem1"; NavigationService.Navigate(new Uri(string.Format("/MyPivotPage.xaml?parameter={0}", parameter), UriKind.Relative)); }
Overrode OnNavigatedTo for the dashboard and query retrieval:
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); string newparameter = this.NavigationContext.QueryString["parameter"]; if (newparameter.Equals("myPivotItem1")) { myPivotControl.SelectedItem = myPivotItem1; } else if (newparameter.Equals("myPivotItem2")) { myPivotControl.SelectedItem = myPivotItem2; } }
source share