Timeline::RepeatBehavior Property

Gets or sets the repeating behavior of this timeline.

Namespace:  System.Windows.Media.Animation
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public:
property RepeatBehavior RepeatBehavior {
	RepeatBehavior get ();
	void set (RepeatBehavior value);
}
<object RepeatBehavior="RepeatBehavior" .../>

Property Value

Type: System.Windows.Media.Animation::RepeatBehavior
An iteration Count that specifies the number of times the timeline should play, a TimeSpan value that specifies the total the length of this timeline's active period, or the special value Forever, which specifies that the timeline should repeat indefinitely. The default value is a RepeatBehavior with a Count of 1, which indicates that the timeline plays once.

Identifier field

RepeatBehaviorProperty

Metadata properties set to true

None

If an iteration Count is specified and the timeline's AutoReverse property is set to true, a single repetition consists of one forward iteration and one backward iteration. A timeline with an AutoReverse property set to true an iteration Count of 2 would play forwards, then backwards, then forwards again, and then backwards again.

Instead of specifying the number of times a timeline plays, you can also specify the total length of time you want the timeline to play. For a timeline to repeat, this RepeatBehavior::Duration value should be greater than the timeline's Duration. For example, a timeline with a Duration of 2 seconds and a RepeatBehavior::Duration of 4 seconds will play twice. If the RepeatBehavior::Duration is less than the timeline's Duration, the timeline's active period is cut short.

For more information about repeating timelines, see Animation Overview.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft