如何在Windows中导航特定的透视项目

时间:2015-03-27 12:43:29

标签: c# .net windows-phone-8 windows-phone

在我的Windows应用程序中,我使用4个透视项目,例如现金,更改密码,项目,个人资料。每当我单击任何枢轴项时,页面仅导航到配置文件枢轴项。但我只需要去特定的枢轴项目。请任何人帮助我。

代码:

private void changepassword_Click(object sender, RoutedEventArgs e)
        {
            //Frame.Navigate(typeof(profile), uuid);
            Frame.Navigate(typeof(profile));
        }

1 个答案:

答案 0 :(得分:1)

使用pivot标签索引作为参数

进行导航
Frame.Navigate(typeof(profile), 1)

在您的个人资料页面中:

protected override void OnNavigatedTo(NavigationEventArgs e)
{
    MainPivot.SelectedIndex = (int) e.Parameter;
}