MainPage.xaml

<UserControl x:Class="BeenHive.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="674" d:DesignWidth="920">

    <Grid x:Name="LayoutRoot" >

        <!--设置Grid背景-->
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF585D51" Offset="0.006"/>
                <GradientStop Color="#FF000000" Offset="1"/>
            </LinearGradientBrush>
        </Grid.Background>

        <Canvas x:Name="BeeHive" Height="580" Width="810" Clip="M0,0L810,0 810,580 0,580z" HorizontalAlignment="Center" Margin="55,55,62,46" VerticalAlignment="Center">
             <!--背景-->
            <Path x:Name="background" Height="582" Width="812" Canvas.Left="-1" Canvas.Top="-1" Data="F1M1,1C1,1,811,1,811,1C811,1,811,581,811,581C811,581,1,581,1,581C1,581,1,1,1,1z" UseLayoutRounding="False">
                <Path.OpacityMask>
                    <RadialGradientBrush RadiusX="0.358" RadiusY="0.5">
                        <GradientStop Color="#FF000000" Offset="0"/>
                        <GradientStop Color="#FF000000" Offset="1"/>
                    </RadialGradientBrush>
                </Path.OpacityMask>
                <Path.Fill>
                    <RadialGradientBrush RadiusX="0.358" RadiusY="0.5">
                        <GradientStop Color="#FF5F6B30" Offset="0"/>
                        <GradientStop Color="#FF000000" Offset="1"/>
                    </RadialGradientBrush>
                </Path.Fill>
            </Path>

            <!--蜂窝图片-->
            <Image x:Name="grid" Height="580" Width="768" Source="BeeHive_Images/grid.PNG" Stretch="Fill" Opacity="0.65" Canvas.Left="33"/>
            
            <!--Score图片-->
            <Image x:Name="score" Height="12" Width="116" Opacity="0.6" Canvas.Left="51" Canvas.Top="14" Source="BeeHive_Images/score.png"/>
            <TextBlock x:Name="ScoreText" Canvas.Left="51" Canvas.Top="31" FontFamily="Arial" FontSize="17" FontWeight="Bold" Foreground="#FFFFFFFF" LineHeight="17" LineStackingStrategy="BlockLineHeight" Text="0" TextWrapping="Wrap">
            </TextBlock>

            <!--Last图片-->
            <Image Height="12" Width="92" Source="BeeHive_Images/last.PNG" Stretch="Fill" Opacity="0.4" Canvas.Top="14" Canvas.Left="240"/>
            <TextBlock x:Name="LastScoreText" Canvas.Left="240" Canvas.Top="31" FontFamily="Arial" FontSize="17" FontWeight="Bold" Foreground="#FFFFFFFF" LineHeight="17" LineStackingStrategy="BlockLineHeight" Text="0" TextWrapping="Wrap" Opacity="0.6">
            </TextBlock>

            <!--HI-SCORE图片-->
            <Image Height="12" Width="156" Source="BeeHive_Images/hiscore.png" Stretch="Fill" Opacity="0.4" Canvas.Top="14" Canvas.Left="410"/>
            <TextBlock x:Name="HiScoreText" FontFamily="Arial" FontSize="17" FontWeight="Bold" Foreground="#FFFFFFFF" LineHeight="17" LineStackingStrategy="BlockLineHeight" TextWrapping="Wrap" Canvas.Left="410" Canvas.Top="31" Opacity="0.6" Text="0000">
            </TextBlock>

            <!--LIVES图片-->
            <Image x:Name="lives" Height="12" Width="97" Opacity="0.4" Canvas.Left="652" Canvas.Top="14" Source="BeeHive_Images/lives.png"/>
            <TextBlock x:Name="LivesText" Canvas.Left="654" Canvas.Top="31" FontFamily="Arial" FontSize="18" FontWeight="Bold" Foreground="#FFFFFFFF" LineHeight="18" LineStackingStrategy="BlockLineHeight" Text="4" TextWrapping="Wrap">
            </TextBlock>

            <!--左边墙图片-->
            <Image x:Name="LEFT_WALL" Height="580" Width="12" Opacity="0.102" Canvas.Left="0" Canvas.Top="0" Source="BeeHive_Images/LEFT_WALL.png">
            </Image>

            <!--上边墙图片-->
            <Image x:Name="TOP_WALL" Height="32" Width="810" Opacity="0.102" Canvas.Left="0" Canvas.Top="0" Source="BeeHive_Images/TOP_WALL.png"> 
            </Image>

            <!--右边墙图片-->
            <Image x:Name="RIGHT_WALL" Height="580" Width="12" Opacity="0.102" Canvas.Left="798" Canvas.Top="0" Source="BeeHive_Images/RIGHT_WALL.png">                
            </Image>

            <!--下边墙图片-->
            <Image x:Name="BOTTOM_WALL" Height="16" Width="810" Canvas.Left="0" Canvas.Top="564" Source="BeeHive_Images/BOTTOM_WALL.png"> 
            </Image>

            <!--球图片-->
            <Image x:Name="BALL" Height="22" Width="22" Canvas.Left="381" Canvas.Top="414" Source="BeeHive_Images/BALL.png" Tag="CollideWithAll">
            </Image>

            <!--滑板图片-->
            <Image x:Name="PADDLE" Height="21" Width="117" Canvas.Left="418" Canvas.Top="496" Source="BeeHive_Images/PADDLE.png" RenderTransformOrigin="0.5,0.5">                
            </Image>
           
            <!--开始音乐-->
            <MediaElement x:Name="start_mp3" Height="0" Source="/start.mp3" Stretch="Fill" Width="0"/>

            <!--开始图片-->
            <Image x:Name="ClicktoStart" Height="12" Width="290" Source="BeeHive_Images/ClicktoStart.PNG" Stretch="Fill" IsHitTestVisible="False" Canvas.Top="447" Canvas.Left="253"/>

            <!--结束图片-->
            <Image x:Name="GameOver" Height="54" Width="388" Source="BeeHive_Images/GameOver.PNG" Stretch="Fill" Canvas.Left="201" Canvas.Top="250" Visibility="Collapsed"  />

        </Canvas>
        <Grid x:Name="frame" Height="607" HorizontalAlignment="Center" Margin="5,5,5,5" VerticalAlignment="Center" Width="810">
            <Grid x:Name="masterHead" Height="20" VerticalAlignment="Top" Background="{x:Null}" IsHitTestVisible="False">
                <Rectangle x:Name="masterHead_bg" Fill="#FF28311A" Stroke="{x:Null}"/>
                <Image HorizontalAlignment="Left" Margin="5,5,0,0" Width="98" Stretch="Fill" Height="12" VerticalAlignment="Top" Opacity="0.4" Source="BeeHive_Images/logo_blend311.PNG"/>
                <Image HorizontalAlignment="Right" Margin="5,5,5,0" Width="71" Stretch="Fill" Height="12" VerticalAlignment="Top" Opacity="0.4" Source="BeeHive_Images/logo_SP311.PNG"/>
            </Grid>
            <Rectangle x:Name="footer" Fill="#FF484C44" Stroke="{x:Null}" Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" IsHitTestVisible="False" Canvas.ZIndex="9999" Opacity="0.75"/>
        </Grid>
    </Grid>
</UserControl>

 

转载于:https://www.cnblogs.com/gaowen/p/4842460.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值