2013-08-04 42 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控件进行调查。