-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Media.Animation.Timeline |
winrt class |
Defines a duration and other behavior properties for a Windows Runtime animation. Timeline is the base class for Storyboard and all the Windows Runtime animation types, including those from the animation library and those used for custom animations in visual states or page-level XAML.
Timeline defines the Duration property that controls how long an animation runs once started. Timeline also defines these behavior properties, which are common to all animations types, and to Storyboard:
- AutoReverse
- BeginTime
- FillBehavior
- RepeatBehavior
- SpeedRatio (not commonly used)
Timeline also defines the Completed event for Storyboard and animations. Handling the Completed event isn't necessary or most UI animation scenarios.
The relationship between Storyboard and the animation types is that a Storyboard is a container that can group multiple animations, and acts as the controller for starting and stopping the contained animations. When you set Timeline properties on a Storyboard as opposed to individual animations within a Storyboard, the Timeline properties set in the Storyboard typically override those from the combined animations. For more info see Storyboarded animations.
Timeline has a strongly typed collection class that is used for properties that take a set of Timeline values, such as Storyboard.Children. For more info see TimelineCollection.
Timeline is the parent class for several immediately derived classes that support the storyboarded animation system and also the built-in library animations. Here are some of the notable derived classes:
-
Storyboard: A container and controller for other storyboarded animations that each target a particular object and property.
-
Typed animations: Each of these is used to animate a property that takes a particular value type, or an object. + ColorAnimation, ColorAnimationUsingKeyFrames
-
Theme animations: These are animations defined by the animation library that you use for common UI interactions.+ DragItemThemeAnimation
Note
Theme transitions don't derive from Timeline, they derive from Transition.
DependencyObject, Storyboard, Storyboarded animations, Storyboarded animations for visual states, Key-frame animations and easing function animations