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,該值指定時間軸應該要無限期地重複。 預設值為1的 , RepeatBehavior Count 表示時間軸播放一次。

備註

如果指定反復 Count 專案且時間軸的 AutoReverse 屬性設定 true 為 ,則單一重複專案包含一個向前反復專案和一個回溯反復專案。 屬性 AutoReverse 設定為 true 的時程表會向前播放 2 個反復 Count 專案,然後向後再向前轉一次,然後再往後轉一次。

您也可以指定時間軸播放的總時間長度,而不是指定時間軸播放的次數。 若要重複時程表,此值 RepeatBehavior.Duration 應大於時程表的 Duration 。 例如,具有 Duration 2 秒且 RepeatBehavior.Duration 4 秒的時程表會播放兩次。 RepeatBehavior.Duration如果 小於時程表的 Duration ,則時程表的作用中期間會縮短。

如需重複時程表的詳細資訊,請參閱 動畫概觀

相依性屬性資訊

識別碼欄位 RepeatBehaviorProperty
設定為 的中繼資料屬性 true

適用於

另請參閱