如何在WPF中设置单个动画重复之间的时间



我有一个等待控件的DoubleAnimation,它永远重复。但我想在每次重复之间设定时间。我该怎么做呢?

我的动画是:
<DoubleAnimation Storyboard.TargetName="rect1"
                 Storyboard.TargetProperty="Height"
                 To="10" BeginTime="0:0:0" Duration="0:0:0.3"
                 AutoReverse="True" RepeatBehavior="Forever"/>

在Storyboard上设置一个Duration:

<Storyboard AutoReverse="True" RepeatBehavior="Forever" Duration="0:0:1">
    <DoubleAnimation Storyboard.TargetName="rect1"
                     Storyboard.TargetProperty="Height"
                     To="10" Duration="0:0:0.3"/>
</Storyboard>

最新更新