RepeatBehavior::Duration Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the total length of time a Timeline should play.

Namespace:   System.Windows.Media.Animation
Assembly:  PresentationCore (in PresentationCore.dll)

public:
property TimeSpan Duration {
	TimeSpan get();
}

Property Value

Type: System::TimeSpan

The total length of time a timeline should play.

Exception Condition
InvalidOperationException

This RepeatBehavior does not describe a repeat duration; it describes an iteration count.

To avoid throwing an exception when accessing this property, use the HasDuration property first to verify that the RepeatBehavior represents a repeat duration.

For more information about making a timeline repeat, see the Timeline::RepeatBehavior property.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: