2013-02-26 82 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元素。

相關問題