ITimeline Interface |
Namespace: DigitalRune.Animation
The ITimeline type exposes the following members.
Name | Description | |
---|---|---|
CreateInstance |
Creates an animation instance that can be used to play back the animation.
(For internal use only.)
| |
GetAnimationTime |
Gets the animation time for the specified time on the timeline.
| |
GetState |
Gets the state of the animation for the specified time on the timeline.
| |
GetTotalDuration |
Gets the total length of the timeline.
|
Name | Description | |
---|---|---|
FillBehavior |
Gets a value that specifies how the animation behaves when it reaches the end of its
duration.
| |
TargetObject |
Gets the object to which the animation is applied by default.
|
A ITimeline is used to define when an animation starts and how long it is active. Timelines can be played back by the animation system.
Fill Behavior: The property FillBehavior defines the behavior of the animation when its duration is exceeded. The fill behavior Hold indicates that the animation holds its last animation value when the end of the duration is reached. The last animation value is returned until the animation is reset or stopped. The fill behavior Stop indicates that the animation should be removed when the end of the duration is reached.
Animation State: The current state of an animation (see enumeration AnimationState) depends on the current time on the timeline. The method GetState(TimeSpan) can be used to query the current state for a given time value. The animation can be Delayed when the animation is scheduled but has not yet started. Playing indicates that the animation is active. When the time reaches the end of the duration the state becomes either Filling when the FillBehavior is set to Hold or Stopped when the fill behavior is set to Stop. When a timeline is Stopped it is automatically removed from the animation system.
Animation Time: The animation time is the local time of the animation. The animation time is required when the animation needs to be evaluated. The function GetAnimationTime(TimeSpan) can be used to convert a time value on the timeline to the animation time.
Nested Timelines: Timelines can be nested: A TimelineGroup, for example, is a timeline that groups other animations. The time values of a nested timeline are relative to the parent timeline.