RepeatBehavior RepeatBehavior RepeatBehavior RepeatBehavior Struct

定義

描述 Timeline 如何重複其簡單持續時間。Describes how a Timeline repeats its simple duration.

public value class RepeatBehavior : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Animation.RepeatBehaviorConverter))]
public struct RepeatBehavior : IFormattable
type RepeatBehavior = struct
    interface IFormattable
Public Structure RepeatBehavior
Implements IFormattable
繼承
RepeatBehaviorRepeatBehaviorRepeatBehaviorRepeatBehavior
屬性
實作

備註

有三種類型的RepeatBehavior行為:There are three types of RepeatBehavior behaviors:

  • 反復專案計數-指定Timeline播放簡單持續時間的次數。Iteration Count - specifies the number of times the simple duration of a Timeline plays. 預設的反復專案計數為 1.0, 表示Timeline只有其中一個簡單持續時間的作用中。The default iteration count is 1.0, and means the Timeline is active for exactly one of its simple durations. 0.5 的計數指定時間軸在其簡單持續時間的一半作用中, 而計數2指定時程表重複其簡單的持續時間兩次。A count of 0.5 specifies that the timeline is active for half of its simple duration, while a count of 2 specifies that the timeline repeats its simple duration twice. 如需詳細資訊,請參閱 Count 屬性 (Property)。For more information, see the Count property.

  • Duration -指定Timeline物件的作用中持續時間長度。Duration - specifies the length of the Timeline object's active duration. 例如, 一個Timeline簡單Duration的值為1秒, 而RepeatBehavior.Duration值為2.5 秒, 則會執行2.5 次反覆運算。For example, a Timeline with a simple Duration value of 1 second and a RepeatBehavior.Duration value of 2.5 seconds will run for 2.5 iterations.

  • 永遠- Timeline無限期地重複。Forever - the Timeline repeats indefinitely.

XAML Attribute UsageXAML Attribute Usage

<object property="iterationCountx"/><object property="iterationCountx"/>

-或--or-

<物件**屬性= "[]。小時:分鐘:[。fractionalSeconds] "/><object property="[days.]hours:minutes:seconds[.fractionalSeconds]"/>

-或--or-

<物件**屬性= "[]。小時:分鐘"/><object property="[days.]hours:minutes"/>

-或--or-

<object property="days"/><object property="days"/>

-或--or-

<object property="Forever"/><object property="Forever"/>

-

XAML 值XAML Values

方括弧 ([]) 中的專案是選擇性的。Items in square brackets ([ and ]) are optional.

iterationCountiterationCount
System.Double

大於或等於0的值, 指定時間軸應該播放的次數。A value greater than or equal to 0 that specifies the number of times a timeline should play. 如需詳細資訊,請參閱 Count 屬性 (Property)。For more information, see the Count property.

之內days
System.Int32

大於或等於0的值, 指定Timeline物件作用中持續時間的天數。A value greater than or equal to 0 that specifies the number of days for a Timeline object's active duration. 如需詳細資訊,請參閱 Duration 屬性 (Property)。For more information, see the Duration property.

多少hours
System.Int32

介於0和23之間的值, 指定Timeline物件作用中持續時間的時數。A value between 0 and 23 that specifies the number of hours for a Timeline object's active duration. 如需詳細資訊,請參閱 Duration 屬性 (Property)。For more information, see the Duration property.

細節minutes
System.Int32

介於0和59之間的值, 指定Timeline物件的作用中持續時間的分鐘數。A value between 0 and 59 that specifies the number of minutes for a Timeline object's active duration. 如需詳細資訊,請參閱 Duration 屬性 (Property)。For more information, see the Duration property.

表示seconds
System.Double

介於0和59之間的值, 指定Timeline物件的作用中持續時間的秒數。A value between 0 and 59 that specifies the number of seconds for a Timeline object's active duration. 如需詳細資訊,請參閱 Duration 屬性 (Property)。For more information, see the Duration property.

fractionalSecondsfractionalSeconds
System.Int32

包含1到7位數的值, 代表小數秒數。A value consisting of 1 to 7 digits that represents fractional seconds.

建構函式

RepeatBehavior(Double) RepeatBehavior(Double) RepeatBehavior(Double) RepeatBehavior(Double)

使用指定的反覆運算計數初始化 RepeatBehavior 結構的新執行個體。Initializes a new instance of the RepeatBehavior structure with the specified iteration count.

RepeatBehavior(TimeSpan) RepeatBehavior(TimeSpan) RepeatBehavior(TimeSpan) RepeatBehavior(TimeSpan)

使用指定的重複持續時間初始化 RepeatBehavior 結構的新執行個體。Initializes a new instance of the RepeatBehavior structure with the specified repeat duration.

屬性

Count Count Count Count

取得 Timeline 應該重複的次數。Gets the number of times a Timeline should repeat.

Duration Duration Duration Duration

取得 Timeline 應該作用的時間總長度。Gets the total length of time a Timeline should play.

Forever Forever Forever Forever

取得 RepeatBehavior,指定無限重複次數。Gets a RepeatBehavior that specifies an infinite number of repetitions.

HasCount HasCount HasCount HasCount

取得值,這個值指出重複行為是否具有指定的反覆計數。Gets a value that indicates whether the repeat behavior has a specified iteration count.

HasDuration HasDuration HasDuration HasDuration

取得值,這個值指出重複行為是否具有指定之重複的持續時間。Gets a value that indicates whether the repeat behavior has a specified repeat duration.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

表示這個執行個體是否等於指定的物件。Indicates whether this instance is equal to the specified object.

Equals(RepeatBehavior) Equals(RepeatBehavior) Equals(RepeatBehavior) Equals(RepeatBehavior)

傳回值,這個值表示這個執行個體是否等於指定的 RepeatBehaviorReturns a value that indicates whether this instance is equal to the specified RepeatBehavior.

Equals(RepeatBehavior, RepeatBehavior) Equals(RepeatBehavior, RepeatBehavior) Equals(RepeatBehavior, RepeatBehavior) Equals(RepeatBehavior, RepeatBehavior)

表示兩個指定的 RepeatBehavior 結構是否相等。Indicates whether the two specified RepeatBehavior structures are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

傳回這個執行個體的雜湊碼。Returns the hash code of this instance.

ToString() ToString() ToString() ToString()

傳回這個 RepeatBehavior 執行個體的字串表示。Returns a string representation of this RepeatBehavior instance.

ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider)

以指定的格式,傳回這個 RepeatBehavior 執行個體的字串表示。Returns a string representation of this RepeatBehavior instance with the specified format.

運算子

Equality(RepeatBehavior, RepeatBehavior) Equality(RepeatBehavior, RepeatBehavior) Equality(RepeatBehavior, RepeatBehavior) Equality(RepeatBehavior, RepeatBehavior)

指出兩個指定的 RepeatBehavior 執行個體是否相等。Indicates whether the two specified RepeatBehavior instances are equal.

Inequality(RepeatBehavior, RepeatBehavior) Inequality(RepeatBehavior, RepeatBehavior) Inequality(RepeatBehavior, RepeatBehavior) Inequality(RepeatBehavior, RepeatBehavior)

指出兩個 RepeatBehavior 執行個體是否相等。Indicates whether the two RepeatBehavior instances are not equal.

明確介面實作

IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider)

使用指定的格式,格式化目前執行個體的值。Formats the value of the current instance using the specified format.

適用於