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>
  • 相关阅读:
    Python列表、元组、字典、集合的方法
    Python字符串方法总结
    进程、线程、协和的对比
    案例:图片下载器
    使用gevent实现多任务
    使用greenle完成多任务
    使用yield完成多任务
    生成器总结
    生成器send函数
    生成器yield关键字
  • 原文地址:https://www.cnblogs.com/w2011/p/2472851.html
Copyright © 2011-2022 走看看