问题
In my windows application, I am using 4 pivot items for example cash,change password, items,profile. whenever i click the any pivot item the page navigate to profile pivot item only. But i need to go to particular pivot item only. Please any one help me out.
code:
private void changepassword_Click(object sender, RoutedEventArgs e)
{
//Frame.Navigate(typeof(profile), uuid);
Frame.Navigate(typeof(profile));
}
回答1:
Navigate with pivot tab index as parameter
Frame.Navigate(typeof(profile), 1)
In your profile page:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
MainPivot.SelectedIndex = (int) e.Parameter;
}
来源:https://stackoverflow.com/questions/29300984/how-to-navigate-the-particular-pivot-item-in-windows