zoukankan      html  css  js  c++  java
  • WPF模拟雷达界面效果图

    iPad塔防的防守兵的效果很炫,2个小时用WPF模拟了一个。

    效果图:

    关键代码:

        <Grid>
            <Grid.Background>
                <ImageBrush ImageSource="Koala.jpg"/>
            </Grid.Background>
    
            <Button Content="Button1" HorizontalAlignment="Left" Margin="187,107,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/>
    
            <Grid x:Name="m_Grid" HorizontalAlignment="Left" VerticalAlignment="Top" Height="300" Width="300" MouseUp="m_Grid_MouseUp" Margin="69,31,0,0">
                <Ellipse Stroke="White" StrokeThickness="1">
                    <Ellipse.Fill>
                        <RadialGradientBrush Opacity="1" RadiusX="0.5" RadiusY="0.5" GradientOrigin="0.5,0.5">
                            <GradientStop Color="White" Offset="1.1" ></GradientStop>
                            <GradientStop Color="Transparent" Offset="0.92"></GradientStop>
                        </RadialGradientBrush>
                    </Ellipse.Fill>
                </Ellipse>
                <Ellipse x:Name="m_Ellipse" Stroke="White" Margin="4">
                    <Ellipse.Fill>
                        <RadialGradientBrush Opacity="1" RadiusX="0.5" RadiusY="0.5" GradientOrigin="0.5,0.5">
                            <GradientStop Color="White" Offset="0.97" ></GradientStop>
                            <GradientStop Color="Transparent" Offset="0.96"></GradientStop>
                        </RadialGradientBrush>
                    </Ellipse.Fill>
                    <Ellipse.Clip>
                        <RectangleGeometry Rect="0,0,100,100" />
                    </Ellipse.Clip>
                    <Ellipse.RenderTransform>
                        <RotateTransform Angle="0" CenterX="146" CenterY="146"  /> 
                    </Ellipse.RenderTransform>
                    <Ellipse.Triggers>
                        <EventTrigger RoutedEvent="Window.Loaded">
                            <BeginStoryboard>
                                <Storyboard RepeatBehavior="Forever">
                                    <DoubleAnimation Storyboard.TargetName="m_Ellipse"
                                                     Storyboard.TargetProperty="(Ellipse.RenderTransform).(RotateTransform.Angle)"
                                                     To="180" 
                                                     Duration="0:0:5"/>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Ellipse.Triggers>
                </Ellipse>
                <Ellipse x:Name="m_Ellipse2" Stroke="White" Margin="4">
                    <Ellipse.Fill>
                        <RadialGradientBrush Opacity="1" RadiusX="0.5" RadiusY="0.5" GradientOrigin="0.5,0.5">
                            <GradientStop Color="White" Offset="0.97" ></GradientStop>
                            <GradientStop Color="Transparent" Offset="0.96"></GradientStop>
                        </RadialGradientBrush>
                    </Ellipse.Fill>
                    <Ellipse.Clip>
                        <RectangleGeometry Rect="0,0,100,100" />
                    </Ellipse.Clip>
                    <Ellipse.RenderTransform>
                        <RotateTransform Angle="180" CenterX="146" CenterY="146"  />
                    </Ellipse.RenderTransform>
                    <Ellipse.Triggers>
                        <EventTrigger RoutedEvent="Window.Loaded">
                            <BeginStoryboard>
                                <Storyboard RepeatBehavior="Forever">
                                    <DoubleAnimation Storyboard.TargetName="m_Ellipse2"
                                                     Storyboard.TargetProperty="(Ellipse.RenderTransform).(RotateTransform.Angle)"
                                                     To="360" 
                                                     Duration="0:0:5"/>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Ellipse.Triggers>
                </Ellipse>
    
                <Button Content="PopButton" HorizontalAlignment="Left" Margin="18,126,0,0" VerticalAlignment="Top" Width="75"/>
            </Grid>
            
        </Grid>
  • 相关阅读:
    taotao-manager/taotao-manager-interface/pom.xml
    taotao-manager/taotao-manager-pojo/pom.xml
    taotao-manager/pom.xml
    taotao-manager/taotao-manager-dao/pom.xml
    taotao-common/pom.xml
    taotao-parent/pom.xml(父工程的pom.xml文件配置)
    idea社区版使用maven运行web项目
    IntelliJ IDEA Community社区版集成Tomcat教程
    linux中没有tree命令,command not found,解决办法
    数据导入导出
  • 原文地址:https://www.cnblogs.com/sshoub/p/2981772.html
Copyright © 2011-2022 走看看