2013-02-26 62 views
0

this picture is android's tabviewthis is android-like tabview which in the pivot control在Windows Phone中,如何实现类似android的tabview?

第一画面是机器人的TabView的
第二画面是机器人状TabView的这在摆动控制
TabView的是在枢轴页网格
我想有一个结果就像第二张图片
任何建议将是伟大的!
感谢

<phone:PhoneApplicationPage 
    x:Class="ewlan.PivotMainPage" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" 
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" 
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}" 
    FontSize="{StaticResource PhoneFontSizeNormal}" 
    Foreground="{StaticResource PhoneForegroundBrush}" 
    SupportedOrientations="Portrait" Orientation="Portrait" 
    shell:SystemTray.IsVisible="False"> 



    <Grid x:Name="LayoutRoot" Background="Transparent"> 

//what's in here? 
//i know pivot 
//what i need to know is what in the pivot.item 
//hope u can know my meanings,any suggestions will be great 

    </Grid> 

回答

2

好吧,如果你创建一个新的应用程序,并添加一个枢轴页面,它会产生在枢轴控件的一些网页。我建议你看看它并添加必要的控制。看看MSDN reference了解更多信息。你会得到这样的东西:

<!--LayoutRoot is the root grid where all page content is placed.--> 
<Grid x:Name="LayoutRoot" Background="Transparent"> 
    <!--Pivot Control--> 
    <controls:Pivot Title="MY APPLICATION"> 
     <!--Pivot item one--> 
     <controls:PivotItem Header="item1"> 
      <Grid/> 
     </controls:PivotItem> 

     <!--Pivot item two--> 
     <controls:PivotItem Header="item2"> 
      <Grid/> 
     </controls:PivotItem> 
    </controls:Pivot> 
</Grid> 

枢轴包含PivotItems,其中包含您的UI元素。

相关问题