是否可以通过按钮单击事件导航到枢轴控制页面枢轴、可以通过、单击、按钮

由网友(你不会再遇到第二个我)分享简介:我正在尝试创建一个 wp7 枢轴控制应用程序.单击第一页中的按钮时,我想导航到另一个已经是数据透视页面的页面.有可能吗?I'm trying to create a wp7 pivot control application. On click of a button in the first page, I wou...

我正在尝试创建一个 wp7 枢轴控制应用程序.单击第一页中的按钮时,我想导航到另一个已经是数据透视页面的页面.有可能吗?

I'm trying to create a wp7 pivot control application. On click of a button in the first page, I would like to navigate to another page which is already a pivot page. Is it possible ?

推荐答案

例如,如果您对 Pivot 控件有以下定义:

If you have for example following definition for the Pivot control:

 <controls:Pivot x:Name="SettingsPivot" Title="settings">
   <controls:PivotItem x:Name="GeneralSettings" Header="general settings">
     <!-- Pivot Item content -->
   </controls:PivotItem>
   <controls:PivotItem x:Name="ConnectivitySettings" Header="connectivity settings">
     <!-- Pivot Item content -->
   </controls:PivotItem>
   <controls:PivotItem x:Name="OtherSettings" Header="other settings">
     <!-- Pivot Item content -->
   </controls:PivotItem>
 </controls:Pivot>

然后您可以在按钮单击事件处理程序中使用此代码转到其他设置:

Then you can go to for example OtherSettings using this code in the button click event handler:

SettingsPivot.SelectedItem = OtherSettings;
阅读全文

相关推荐

最新文章