zoukankan      html  css  js  c++  java
  • wpf 炫彩动画效果简单实例

    <Button >
    <Button.Background>
    <LinearGradientBrush>
    <GradientStop Color="Blue" Offset="0"></GradientStop>
    <GradientStop Color="Black" Offset="0.5"></GradientStop>
    <GradientStop Color="Blue" Offset="1"></GradientStop>
    </LinearGradientBrush>
    </Button.Background>
    <Button.Triggers>
    <EventTrigger RoutedEvent="Button.Loaded">
    <EventTrigger.Actions>
    <BeginStoryboard>
    <Storyboard >
    <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" From="Black" To="White" Duration="0:0:2" AutoReverse="True" RepeatBehavior="Forever">
    </ColorAnimation>
    </Storyboard>
    </BeginStoryboard>
    <BeginStoryboard>
    <Storyboard>
    <DoubleAnimation Storyboard.TargetProperty="Background.GradientStops[1].Offset"
    From
    ="0" To="1" Duration="0:0:2" AutoReverse="True" RepeatBehavior="Forever">
    </DoubleAnimation>
    </Storyboard>
    </BeginStoryboard>
    </EventTrigger.Actions>
    </EventTrigger>
    </Button.Triggers>
    </Button>

    效果图变化:

      ==》

  • 相关阅读:
    Entity Framework4.0 (一)概述(EF4 的Database First方法)
    开园第一篇,Hello cnBlog
    汇编学习笔记32
    汇编学习笔记25
    汇编学习笔记33
    汇编学习笔记28
    汇编学习笔记29,30
    汇编学习笔记23
    汇编学习笔记27
    汇编学习笔记31
  • 原文地址:https://www.cnblogs.com/wpf123/p/2095436.html
Copyright © 2011-2022 走看看