/// <summary>
/// 设置颜色动画
/// </summary>
/// <returns></returns>
private SolidColorBrush ColorAnimation()
{ ColorAnimationUsingKeyFrames colorAnimation = new ColorAnimationUsingKeyFrames();
colorAnimation.Duration = TimeSpan.FromSeconds(1);
colorAnimation.FillBehavior = FillBehavior.Stop;
colorAnimation.KeyFrames.Add(new DiscreteColorKeyFrame(Brushes.Red.Color, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(0.5))));
colorAnimation.KeyFrames.Add(new DiscreteColorKeyFrame(Brushes.Transparent.Color, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(1))));
colorAnimation.KeyFrames.Add(new DiscreteColorKeyFrame(Brushes.Red.Color, KeyTime.FromTimeSpan(TimeSpan.FromSeconds(1.5))));
SolidColorBrush background = new SolidColorBrush();
AnimationClock myClock = colorAnimation.CreateClock();
background.ApplyAnimationClock(SolidColorBrush.ColorProperty, myClock);
return background;
}