zoukankan      html  css  js  c++  java
  • WPF 中的简单的动画

    XMAL代码

    <Window x:Class="RibbonApp.View.Animaion.WinEclipse"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="WinEclipse" Height="300" Width="300">
        <Grid>
            <Ellipse Height="50" Width="100" Margin="89,106,89,0" VerticalAlignment="Top">
                <Ellipse.Fill>
                    <SolidColorBrush x:Name="ellipsebrush" Color="SteelBlue"></SolidColorBrush>
                </Ellipse.Fill>
                <Ellipse.Triggers>
                    <EventTrigger RoutedEvent="Ellipse.Loaded">
                        <EventTrigger.Actions>
                            <BeginStoryboard>
                                <Storyboard Duration="00:00:06" RepeatBehavior="Forever">
                                    <DoubleAnimation Storyboard.TargetProperty="Ellipse.Width"
                                                     Duration="0:0:3" AutoReverse="True"
                                                      FillBehavior="Stop" RepeatBehavior="Forever" AccelerationRatio="0.9"
                                                     DecelerationRatio="0.1" From="100"  To="300">
                                       
                                    </DoubleAnimation>
                                    <ColorAnimation Storyboard.TargetName="ellipsebrush"  Duration="0:0:3"
                                                     AutoReverse="True" FillBehavior="Stop" RepeatBehavior="Forever"
                                                     From="Yellow" To="Red">
                                        
                                    </ColorAnimation>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger.Actions>
                    </EventTrigger>
                </Ellipse.Triggers>
            </Ellipse>
        </Grid>
    </Window>
  • 相关阅读:
    爬虫入门(五)
    爬虫入门(四)
    爬虫入门(三)
    爬虫入门(二)
    爬虫入门(一)
    openpyxl的简单使用
    ansible(三)
    ansible(二)
    ansible(一)
    CF Global Round 10-F
  • 原文地址:https://www.cnblogs.com/w2011/p/2472851.html
Copyright © 2011-2022 走看看