Timeline.RepeatBehavior 属性

定义

获取或设置此时间线的重复行为。

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

属性值

RepeatBehavior

迭代 Count,指定时间线应播放的次数;TimeSpan 值,指定时间线活动期间的总的时间长度;或者特殊值 Forever,指定时间线将不限次数地重复播放。 默认值为 RepeatBehavior Count 1,表示时间线播放一次。

注解

如果指定了迭代 Count 并将时间线 AutoReverse 的属性设置为 true,则单个重复由一个向前迭代和一个向后迭代组成。 属性设置为 true 的时间线 AutoReverse ,迭代 Count 2 将向前播放,然后向后,然后再次向前,然后向后。

还可以指定希望时间线播放的总时间长度,而不是指定时间线播放的次数。 若要重复时间线,此值RepeatBehavior.Duration应大于时间线。Duration 例如,时间线的 Duration 2 秒和 RepeatBehavior.Duration 4 秒将播放两次。 如果时间 RepeatBehavior.Duration 线小于时间线 Duration,则时间线的活动期将缩短。

有关重复时间线的详细信息,请参阅 动画概述

依赖项属性信息

标识符字段 RepeatBehaviorProperty
元数据属性设置为 true

适用于

另请参阅