Ali Tor
Ali Tor

Reputation: 3005

How to set time between single Animation repeats in WPF?

I have a DoubleAnimation for a waiting control and it repeats forever. But I want to set time between every repeats. How can I do that?

My animation is:

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

Upvotes: 1

Views: 660

Answers (1)

Clemens
Clemens

Reputation: 128147

Set a Duration on the enclosing Storyboard:

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

Upvotes: 1

Related Questions