通过在wp8.1中添加一行来自定义数据透视表头

时间:2015-08-02 19:46:19

标签: xaml windows-phone-8.1 pivot

我正在尝试实施解决方案,如下图所示。我无法进入枢轴标题的视觉状态。通过这样做,我想附加如图所示的线与相应的枢轴标题。当人员滑动到下一个枢轴标题时,该行应该移动或显示。任何想法。?enter image description here

代码段:

 <Grid>
  <Pivot x:Uid="Pivot" Title="MY APPLICATION" x:Name="pivot" CommonNavigationTransitionInfo.IsStaggerElement="True">
    <!--Pivot item one-->
    <PivotItem
        x:Uid="PivotItem1"
        Margin="19,14.5,0,0"
        Header="first"
        DataContext="{Binding FirstGroup}"
        d:DataContext="{Binding Groups[0], Source={d:DesignData Source=/DataModel/SampleData.json, Type=data:SampleDataSource}}"
        CommonNavigationTransitionInfo.IsStaggerElement="True">
        <TextBlock Text="Hello 1 " FontSize="32" Foreground="White" />

    </PivotItem>

    <!--Pivot item two-->
    <PivotItem
        x:Uid="PivotItem2"
        Margin="19,14.5,0,0"
        Header="second"
        DataContext="{Binding SecondGroup}"
        d:DataContext="{Binding Groups[1], Source={d:DesignData Source=/DataModel/SampleData.json, Type=data:SampleDataSource}}">
        <!--Double line list no text wrapping-->
        <TextBlock Text="Hello 2 " FontSize="32" Foreground="White" />
    </PivotItem>

    <!--Pivot item three-->
    <PivotItem
        x:Uid="PivotItem3"
        Margin="19,14.5,0,0"
        Header="third"
        DataContext="{Binding SecondGroup}"
        d:DataContext="{Binding Groups[1], Source={d:DesignData Source=/DataModel/SampleData.json, Type=data:SampleDataSource}}">
        <TextBlock Text="Hello 3 " FontSize="32" Foreground="White" />
    </PivotItem>


</Pivot>
<Rectangle x:Name="rectangle" Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="5" Margin="20,104,0,0" Stroke="Orange" VerticalAlignment="Top" Width="94" RenderTransformOrigin="0.5,0.5">
    <Rectangle.RenderTransform>
        <CompositeTransform/>
    </Rectangle.RenderTransform>
</Rectangle>

0 个答案:

没有答案