Modifica

Condividi tramite


Timeline.RepeatBehavior Property

Definition

Gets or sets the repeating behavior of this timeline.

public:
 property System::Windows::Media::Animation::RepeatBehavior RepeatBehavior { System::Windows::Media::Animation::RepeatBehavior get(); void set(System::Windows::Media::Animation::RepeatBehavior value); };
public System.Windows.Media.Animation.RepeatBehavior RepeatBehavior { get; set; }
member this.RepeatBehavior : System.Windows.Media.Animation.RepeatBehavior with get, set
Public Property RepeatBehavior As RepeatBehavior

Property Value

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.

Remarks

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.

Dependency Property Information

Identifier field RepeatBehaviorProperty
Metadata properties set to true None

Applies to

See also