如何在 Windows 中导航特定的枢轴项 [英] how to navigate the particular pivot item in windows

查看:28
本文介绍了如何在 Windows 中导航特定的枢轴项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

代码:

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

推荐答案

使用透视标签索引作为参数导航

Navigate with pivot tab index as parameter

Frame.Navigate(typeof(profile), 1)

在您的个人资料页面:

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

这篇关于如何在 Windows 中导航特定的枢轴项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆