2013-08-04 50 views
0

我想製作一個應用程序,有一個uri幾個「頁面」, 你可以滾動到使用向右滾動或向左滾動手勢 我想象通過使fiew網格相鄰但我可以想到幾個問題,在我應該定位用戶在某個頁面上,取決於在另一個頁面上選擇的東西,我不應該讓用戶停止滾動並在這些頁面之間結束。初學者的windows phone 8佈局

回答

1

此使用數據透視簡直可以做

XAML

<phone:Pivot Title="MyApplicationName" x:Name="MyPivot"> 
    <phone:PivotItem Header="Pivot Page1"> 
    <Grid> 
     ///Place here Your Page Content 
    </Grid> 
    </phone:PivotItem> 

<phone:PivotItem Header="Pivot Page2"> 
    <Grid> 
     ///Place here Your Second Page Content 
    </Grid> 
    </phone:PivotItem> 
<phone:Pivot> 

併爲獲得用戶對特定頁面只是瀏覽這個網頁例如,當傳遞參數

C# 第一頁

NavigationService.Navigate(new Uri("/OurPage2.xaml?n"=TheNumberYouWant.ToString(),UriKind.Relative); 

第二頁

protected override OnNavigatedTo(NavigationEventArgs e) 
{ 
    int index = 0; //Default 
    string temp; 
    NavigationContext.QueryString.TryGetValue("n", out temp); 
    if(!string.IsNullOrEmpty(temp)) 
    index = int.Parse(temp); 
    MyPivot.SelectedIndex = index; 
} 
+0

謝謝你,這是非常有益的 –

1

使用Panorama或Pivot控件進行調查。