如何在windows中导航特定的数据透视项目



在我的windows应用程序中,我使用了4个数据透视项目,例如现金、更改密码、项目、配置文件。每当我单击任何数据透视项目时,页面都会导航到配置文件数据透视项目。但我只需要转到特定的枢轴项目。请任何人帮我。

代码:

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

以透视表选项卡索引作为参数进行导航

Frame.Navigate(typeof(profile), 1)

在您的个人资料页面:

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

最新更新