KeyTime Structure

 

During the relative course of an animation, a KeyTime instance specifies the precise timing when a particular key frame should take place.

Namespace:   System.Windows.Media.Animation
Assembly:  PresentationCore (in PresentationCore.dll)

[TypeConverterAttribute(typeof(KeyTimeConverter))]
public struct KeyTime : IEquatable<KeyTime>

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticPaced

Gets the Paced value which creates timing behavior resulting in an animation that interpolates at a constant rate.

System_CAPS_pubpropertyPercent

Gets the time when the key frame ends expressed as a percentage of the total duration of the animation.

System_CAPS_pubpropertyTimeSpan

Gets the time when the key frame ends expressed as a time relative to the beginning of the animation.

System_CAPS_pubpropertyType

Gets the Type value this instance represents.

System_CAPS_pubpropertySystem_CAPS_staticUniform

Gets the Uniform value which divides the allotted time of the animation evenly between key frames.

NameDescription
System_CAPS_pubmethodEquals(KeyTime)

Indicates whether this instance is equal to the specified KeyTime.

System_CAPS_pubmethodSystem_CAPS_staticEquals(KeyTime, KeyTime)

Indicates whether the two specified KeyTime structures are equal.

System_CAPS_pubmethodEquals(Object)

Indicates whether this instance equals the specified object.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodSystem_CAPS_staticFromPercent(Double)

Creates a new KeyTime instance, with the KeyTimeType property initialized to the value of the specified parameter.

System_CAPS_pubmethodSystem_CAPS_staticFromTimeSpan(TimeSpan)

Creates a new KeyTime instance, with the KeyTimeType property initialized to the value of the specified parameter.

System_CAPS_pubmethodGetHashCode()

Returns an integer hash code representing this instance.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string representing this KeyTime instance. (Overrides ValueType.ToString().)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticEquality(KeyTime, KeyTime)

Overloaded operator that compares two KeyTime structures for equality.

System_CAPS_puboperatorSystem_CAPS_staticImplicit(TimeSpan to KeyTime)

Overloaded operator that implicitly converts a TimeSpan to a KeyTime.

System_CAPS_puboperatorSystem_CAPS_staticInequality(KeyTime, KeyTime)

Overloaded operator that compares two KeyTime structures for inequality.

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.

A 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.

<object property="[days.]hours:minutes:seconds[.fractionalSeconds]"/>

- or -

<object property="[days.]hours:minutes"/>

- or -

<object property="pctValue%"/>

- or -

<object property="Uniform"/>

- or -

<object property="Paced"/>

days

An integer value greater than or equal to 0 that specifies the number of days spanned by this KeyTime. For more information, see the TimeSpan property.

hours

An integer value between 0 and 23 that specifies the number of hours spanned by this KeyTime. For more information, see the TimeSpan property.

minutes

An integer value between 0 and 59 that specifies the number of minutes spanned by this KeyTime. For more information, see the TimeSpan property.

seconds

A floating-point value between 0 and 59 that specifies the number of seconds spanned by this KeyTime. For more information, see the TimeSpan property.

fractionalSeconds

An integer value consisting of 1 to 7 digits that specifies fractional seconds. For more information, see the TimeSpan property.

pctValue

A floating-point value between 0 and 100, inclusive, that specifies this KeyTime as a percentage of the animation's total duration. This should be followed by the literal character %.For more information, see the Percent property.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: