2012-03-15 25 views
0

我正在製作一個Windows Phone 7應用程序與幾個不同的數據透視頁。我想在Visual Studio中執行一些C#代碼,它將移動到當前打開的另一個樞軸。WP7導航到不同的樞軸

回答

0

使用樞軸控件的SelectedIndex屬性移動到所需的一個。 例如,如果您想要轉到第二個數據透視表,請將SelectedIndex設置爲1.

+0

此代碼不起作用 NavigationService.Navigate(new Uri(「/ MainPage.xaml?PivotMain.SelectedIndex = 2」, UriKind.RelativeOrAbsolute)); – Alex 2012-03-21 01:29:15

+0

PivotMain.SelectedIndex = 2; 無需使用NavigationService,您不會導航到其他頁面。 – disklosr 2012-12-05 23:37:31