1.添加Blend包
2.标签引入
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
3.设计矩形样式
<Style x:Key="rec" TargetType="Rectangle">
<Setter Property="Width" Value="10"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Fill" Value="#f1404b"/>
</Style>
4.设置动画故事板
<Storyboard x:Key="fifth_sb" RepeatBehavior="Forever" Storyboard.TargetProperty="Height">
<DoubleAnimation Storyboard.TargetName="rec1" To="50" BeginTime="0:0:0.0" Duration="0:0:0.5" EasingFunction="{StaticResource powerEase}" AutoReverse="True"/>
<DoubleAnimation Storyboard.TargetName="rec2" To="50" BeginTime="0:0:0.2" Duration="0:0:0.5" EasingFunction="{Sta