RepeatBehavior Property

Gets or sets the repeating behavior of this timeline.

<object RepeatBehavior="RepeatBehavior" .../>
value = object.RepeatBehavior
object.RepeatBehavior = value

Property Value


Describes the repeating behavior of this timeline

This property is read/write. The default is 1x (one iteration).


RepeatBehavior has three possible modes: a duration, an iteration count, or the literal "Forever". The duration mode is assumed if there is no literal "x" in the string. To specify a duration in seconds, you must precede the value with "0:0:", because the duration is in the format [days.]hours:minutes:seconds.

See RepeatBehavior for details on the string format you use to specify a RepeatBehavior value, either in script or XAML. Creating a RepeatBehavior in XAML is only possible through a type conversion syntax when setting a property that takes a RepeatBehavior as an attribute string. Basically, a RepeatBehavior can be defined as an h:m:s string, a repetitionsx string, or the special value "Forever".

This property applies both to specific animations and to the parent storyboard. Generally for an animation in a storyboard, you should apply the RepeatBehavior to the storyboard, because otherwise the parent storyboard default of "1x" will prevent any child repeat behaviors from being applied. But you might specify repeat behaviors on child animations if they are intended to run fewer seconds or iterations than the parent storyboard.

Applies To

ColorAnimation, ColorAnimationUsingKeyFrames, DoubleAnimation, DoubleAnimationUsingKeyFrames, PointAnimation, PointAnimationUsingKeyFrames, Storyboard

See Also

Animation Overview

Community Additions