KeyTime KeyTime KeyTime KeyTime Struct

定義

在動畫的相對進程期間,KeyTime 執行個體會指定特定主要畫面格應該發生的確切時間。During the relative course of an animation, a KeyTime instance specifies the precise timing when a particular key frame should take place.

public value class KeyTime : IEquatable<System::Windows::Media::Animation::KeyTime>
[System.ComponentModel.TypeConverter(typeof(System.Windows.KeyTimeConverter))]
public struct KeyTime : IEquatable<System.Windows.Media.Animation.KeyTime>
type KeyTime = struct
Public Structure KeyTime
Implements IEquatable(Of KeyTime)
繼承
屬性
實作

備註

每個主要畫面KeyTime格都會指定主要畫面格的結束時間。Each key frame's KeyTime specifies when that key frame ends. 它不會指定金鑰時間的播放時間長度。It does not specify how long the key time plays. 主要畫面格的播放時間量取決於主要畫面格的結束時間、前一個主要畫面格的結束時間,以及動畫的持續期間。The amount of time a key frame plays is determined by when the key frame ends, when the previous key frame ended, and the animation's duration. 如需詳細資訊, 請參閱主要畫面格動畫總覽See Key-Frame Animations Overview for more information.

可能會以數種不同的格式表示, 包括數值時間值、百分比, 或做為其中一個特殊 sentinel 值UniformPacedKeyTimeA KeyTime may be expressed in several different formats, including a numeric time value, as a percentage, or as one of the special sentinel values Uniform or Paced.

XAML Attribute UsageXAML Attribute Usage

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

-或--or-

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

-或--or-

<object property="pctValue%"/><object property="pctValue%"/>

-或--or-

<object property="Uniform"/><object property="Uniform"/>

-或--or-

<object property="Paced"/><object property="Paced"/>

XAML 值XAML Values

之內days
大於或等於0的整數值, 指定這個KeyTime所跨越的天數。An integer value greater than or equal to 0 that specifies the number of days spanned by this KeyTime. 如需詳細資訊,請參閱 TimeSpan 屬性 (Property)。For more information, see the TimeSpan property.

多少hours
介於0到23之間的整數值, 指定這個KeyTime所跨越的時數。An integer value between 0 and 23 that specifies the number of hours spanned by this KeyTime. 如需詳細資訊,請參閱 TimeSpan 屬性 (Property)。For more information, see the TimeSpan property.

細節minutes
介於0和59之間的整數值, 指定這個KeyTime所跨越的分鐘數。An integer value between 0 and 59 that specifies the number of minutes spanned by this KeyTime. 如需詳細資訊,請參閱 TimeSpan 屬性 (Property)。For more information, see the TimeSpan property.

表示seconds
介於0和59之間的浮點值, 指定這個KeyTime所跨越的秒數。A floating-point value between 0 and 59 that specifies the number of seconds spanned by this KeyTime. 如需詳細資訊,請參閱 TimeSpan 屬性 (Property)。For more information, see the TimeSpan property.

fractionalSecondsfractionalSeconds
包含1到7位數的整數值, 指定小數秒數。An integer value consisting of 1 to 7 digits that specifies fractional seconds. 如需詳細資訊,請參閱 TimeSpan 屬性 (Property)。For more information, see the TimeSpan property.

pctValuepctValue
介於0和 100 (含) 之間的浮點值, 指定此KeyTime為動畫總持續時間的百分比。A floating-point value between 0 and 100, inclusive, that specifies this KeyTime as a percentage of the animation's total duration. 後面應該接著常值字元%。如需詳細資訊, 請Percent參閱屬性。This should be followed by the literal character %.For more information, see the Percent property.

屬性

Paced Paced Paced Paced

取得 Paced 值,該值建立計時行為,因而產生以常數速率進行插補的動畫。Gets the Paced value which creates timing behavior resulting in an animation that interpolates at a constant rate.

Percent Percent Percent Percent

取得主要畫面格的結束時間,以動畫總持續時間的百分比表示。Gets the time when the key frame ends expressed as a percentage of the total duration of the animation.

TimeSpan TimeSpan TimeSpan TimeSpan

取得以動畫開始時間之相對時間表示的主要畫面格結束時間。Gets the time when the key frame ends expressed as a time relative to the beginning of the animation.

Type Type Type Type

取得這個執行個體表示的 Type 值。Gets the Type value this instance represents.

Uniform Uniform Uniform Uniform

取得 Uniform 值,這個值會在主要畫面格之間平均分佈指定的動畫時間。Gets the Uniform value which divides the allotted time of the animation evenly between key frames.

方法

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

指出這個執行個體是否等於指定的物件。Indicates whether this instance equals the specified object.

Equals(KeyTime) Equals(KeyTime) Equals(KeyTime) Equals(KeyTime)

指出這個執行個體是否等於指定的 KeyTimeIndicates whether this instance is equal to the specified KeyTime.

Equals(KeyTime, KeyTime) Equals(KeyTime, KeyTime) Equals(KeyTime, KeyTime) Equals(KeyTime, KeyTime)

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

FromPercent(Double) FromPercent(Double) FromPercent(Double) FromPercent(Double)

建立新的 KeyTime 執行個體,其KeyTimeType 屬性初始化為指定的參數值。Creates a new KeyTime instance, with the KeyTimeType property initialized to the value of the specified parameter.

FromTimeSpan(TimeSpan) FromTimeSpan(TimeSpan) FromTimeSpan(TimeSpan) FromTimeSpan(TimeSpan)

建立新的 KeyTime 執行個體,其KeyTimeType 屬性初始化為指定的參數值。Creates a new KeyTime instance, with the KeyTimeType property initialized to the value of the specified parameter.

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

傳回整數雜湊程式碼,這個雜湊程式碼表示這個執行個體。Returns an integer hash code representing this instance.

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

傳回表示這個 KeyTime 執行個體的字串。Returns a string representing this KeyTime instance.

運算子

Equality(KeyTime, KeyTime) Equality(KeyTime, KeyTime) Equality(KeyTime, KeyTime) Equality(KeyTime, KeyTime)

比較兩個 KeyTime 結構是否相等的多載運算子 (Overloaded Operator)。Overloaded operator that compares two KeyTime structures for equality.

Implicit(TimeSpan to KeyTime) Implicit(TimeSpan to KeyTime) Implicit(TimeSpan to KeyTime) Implicit(TimeSpan to KeyTime)

隱含地將 TimeSpan 轉換為 KeyTime 的多載運算子。Overloaded operator that implicitly converts a TimeSpan to a KeyTime.

Inequality(KeyTime, KeyTime) Inequality(KeyTime, KeyTime) Inequality(KeyTime, KeyTime) Inequality(KeyTime, KeyTime)

比較兩個 KeyTime 結構是否不相等的多載運算子。Overloaded operator that compares two KeyTime structures for inequality.

適用於