Seconds Property (RepeatBehavior)

Gets or sets the number of seconds that the RepeatBehavior represents.

XAML
No direct attribute syntax; see Remarks.
Scripting
value = object.Seconds
object.Seconds = value

Property Value

Double

The number of seconds that the RepeatBehavior represents.

This property is read/write. The default value is 0.

Remarks

Setting this property is only possible through a type conversion syntax when setting a property that takes a RepeatBehavior as an attribute string. You cannot set the Seconds property as a distinct attribute of a RepeatBehavior in XAML, because it is not possible to create a RepeatBehavior element in XAML.

You can set or get the Seconds value in script using object.property syntax, after getting an existing RepeatBehavior as a property value. You can set the value on a running animation, and the value will apply the next time the same animation is started.

If a property that takes a RepeatBehavior is not explicitly set (either through scripting or XAML), then the value of that property might be null. In this case, scripting for object.Seconds will produce an error, because the object is null.

The Seconds value is the converted summation of all the possible unit inputs for a RepeatBehavior. For instance, a RepeatBehavior created with an attribute value of "0:01:00.555" will have a Seconds value of 60.555. Only the Seconds property exists for getting the representative value; there are no scripting properties for Minutes, Days, Milliseconds, etc.

If the RepeatBehavior was set as "Forever", or was set using the repetitionsx form (number of repetitions as a string followed by "x"), then the value of Seconds will be 0.

Applies To

RepeatBehavior

See Also

Animation Overview

Community Additions

Show: