KeyTime Structure
During the relative course of an animation, a KeyTime instance specifies the precise timing when a particular key frame should take place.
Assembly: PresentationCore (in PresentationCore.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | Paced | Gets the Paced value which creates timing behavior resulting in an animation that interpolates at a constant rate. |
![]() | Percent | Gets the time when the key frame ends expressed as a percentage of the total duration of the animation. |
![]() | TimeSpan | Gets the time when the key frame ends expressed as a time relative to the beginning of the animation. |
![]() | Type | Gets the Type value this instance represents. |
![]() ![]() | Uniform | Gets the Uniform value which divides the allotted time of the animation evenly between key frames. |
| Name | Description | |
|---|---|---|
![]() | Equals(KeyTime) | Indicates whether this instance is equal to the specified KeyTime. |
![]() ![]() | Equals(KeyTime, KeyTime) | Indicates whether the two specified KeyTime structures are equal. |
![]() | Equals(Object^) | Indicates whether this instance equals the specified object.(Overrides ValueType::Equals(Object^).) |
![]() ![]() | FromPercent(Double) | Creates a new KeyTime instance, with the KeyTimeType property initialized to the value of the specified parameter. |
![]() ![]() | FromTimeSpan(TimeSpan) | Creates a new KeyTime instance, with the KeyTimeType property initialized to the value of the specified parameter. |
![]() | GetHashCode() | Returns an integer hash code representing this instance.(Overrides ValueType::GetHashCode().) |
![]() | GetType() | |
![]() | ToString() | Returns a string representing this KeyTime instance. (Overrides ValueType::ToString().) |
| Name | Description | |
|---|---|---|
![]() ![]() | Equality(KeyTime, KeyTime) | Overloaded operator that compares two KeyTime structures for equality. |
![]() ![]() | Implicit(TimeSpan to KeyTime) | Overloaded operator that implicitly converts a TimeSpan to a KeyTime. |
![]() ![]() | Inequality(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.
- 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.
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.



