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>
  • 相关阅读:
    [转]Linq使用心得——SelectMany替代二重foreach循环
    设计模式—装饰者模式
    设计模式—桥接模式
    iOS_autoLayout_Masonry
    排序算法
    h.264硬件解码
    FFmpegh.264解码
    AAC编解码
    socket UDP简单通讯
    socket TCP简单通讯
  • 原文地址:https://www.cnblogs.com/w2011/p/2472851.html
Copyright © 2011-2022 走看看