C# 在windows phone 8应用程序中将轴放置在网格下

C# 在windows phone 8应用程序中将轴放置在网格下,c#,windows-phone-8,C#,Windows Phone 8,我正在创建一个windows phone 8应用程序。应用程序有一个轴心。要求在pivot顶部有一个静态块,以显示需要始终存在的数据,而不管当前可见哪个pivot。AccuWeather应用程序就是一个例子我尝试过将stackpanel、listview、textbox等放置在同一个网格下,但两个控件都覆盖在同一个网格下,但都不起作用。此外,我尝试过将另一个网格放置在固定轴的网格顶部,在这种情况下,页面将停止显示。关于如何解决问题的任何提示/帮助?我已搜索了web,但找不到适当的信息。请尝试以下


我正在创建一个windows phone 8应用程序。应用程序有一个轴心。要求在pivot顶部有一个静态块,以显示需要始终存在的数据,而不管当前可见哪个pivot。AccuWeather应用程序就是一个例子
我尝试过将stackpanel、listview、textbox等放置在同一个网格下,但两个控件都覆盖在同一个网格下,但都不起作用。
此外,我尝试过将另一个网格放置在固定轴的网格顶部,在这种情况下,页面将停止显示。
关于如何解决问题的任何提示/帮助?
我已搜索了web,但找不到适当的信息。

请尝试以下操作:

[<phone:PhoneApplicationPage
    x:Class="SampleStackPivotApp.MainPage"
    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:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--Static Control Block-->
        <Grid x:Name="StaticContentGrid" Margin="12,0,12,0">
            <StackPanel>
                <TextBlock Text="Some Content goes Here" FontSize="30"></TextBlock>
                <TextBlock Text="Another Content goes Here" ></TextBlock>
            </StackPanel>
        </Grid>


        <!--Pivot Control-->
        <phone:Pivot Grid.Row="1">
            <phone:Pivot.Title>
                    <StackPanel>
                        <TextBlock Text="Pivot Name Goes here"></TextBlock>
                    </StackPanel>
            </phone:Pivot.Title>
            <!--Pivot item one-->
            <phone:PivotItem Header="first">
                <!--Double line list with text wrapping-->
                <phone:LongListSelector Margin="0,0,-12,0" ItemsSource="{Binding Items}">
                    <phone:LongListSelector.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17">
                                <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                                <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                            </StackPanel>
                        </DataTemplate>
                    </phone:LongListSelector.ItemTemplate>
                </phone:LongListSelector>
            </phone:PivotItem>

            <!--Pivot item two-->
            <phone:PivotItem Header="second">
                <!--Double line list no text wrapping-->
                <phone:LongListSelector Margin="0,0,-12,0" ItemsSource="{Binding Items}">
                    <phone:LongListSelector.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Margin="0,0,0,17">
                                    <TextBlock Text="{Binding LineOne}" TextWrapping="NoWrap" Margin="12,0,0,0" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                                    <TextBlock Text="{Binding LineThree}" TextWrapping="NoWrap" Margin="12,-6,0,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                </StackPanel>
                            </DataTemplate>
                    </phone:LongListSelector.ItemTemplate>
                </phone:LongListSelector>
            </phone:PivotItem>
        </phone:Pivot>
    </Grid>
</phone:PhoneApplicationPage>][1]
[
][1]