RelativePanel内的RelativePanel无法正常工作UWP C#

时间:2016-07-09 09:59:06

标签: c# uwp panel windows-10-universal relative

我有一个UWP应用程序。在MainPage中,我有一个Big RelativePanel,它包含一个FlipView和它下面的第二个RelativePanel。我希望第二个RelativePanel(即蓝色并包含PlayButton和“立即监听”)具有相对于到达AppBar的屏幕(任何屏幕)大小的高度。在图片中,屏幕大小为1024x768。换句话说,我希望蓝色的RelativePanel覆盖所有屏幕,直到AppBar。

                           

<RelativePanel x:Name="BigRelativePanel">

    <Image x:Name="LogoImage" Source="{Binding}" HorizontalAlignment="Center" Width="120" Height="120" Margin="0,20,0,0" RelativePanel.AlignTopWithPanel="True" RelativePanel.AlignHorizontalCenterWithPanel="True"/>

    <FlipView x:Name="MenuFlipView" FlowDirection="LeftToRight" Height="350" Margin="0,10,0,0" RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True" RelativePanel.AlignHorizontalCenterWithPanel="True" RelativePanel.Below="LogoImage">
        <FlipViewItem>
            <GridView Grid.Row="1" x:Name="FirstSixGrids" SelectionMode="None" IsItemClickEnabled="True" ItemsSource="{x:Bind myMenu_1}" ItemClick="FirstSixGrids_ItemClick" ItemTemplate="{StaticResource MenuTemplate}" ItemsPanel="{StaticResource MenuItemsPanel}"></GridView>
        </FlipViewItem>
    </FlipView>

    <RelativePanel Background="{StaticResource TransparentBlue}"
                   RelativePanel.Below="MenuFlipView"
                   RelativePanel.AlignBottomWithPanel="True"
                   RelativePanel.AlignLeftWithPanel="True"
                   RelativePanel.AlignRightWithPanel="True">
        <Image x:Name="rotateImage" Source="/Assets/Icons/AnimatedPlay.png" Width="85" Height="85" Margin="0,17,0,0" RelativePanel.AlignHorizontalCenterWithPanel="True" />
        <Button x:Name="PlayButton" Style="{StaticResource CircleButton}" Width="80" Height="80" Margin="0,20,0,0" Foreground="White" RelativePanel.AlignHorizontalCenterWithPanel="True" Click="PlayButton_Click">
            <Image Source="/Assets/Icons/IconPlay.png"/>
        </Button>
        <TextBlock x:Name="radioTimerBlock" Text="Listen Now" Foreground="White" HorizontalAlignment="Center" RelativePanel.AlignHorizontalCenterWithPanel="True" RelativePanel.Below="PlayButton" Margin="0,5,0,0"/>
    </RelativePanel>
</RelativePanel>

enter image description here

0 个答案:

没有答案