Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
Equivalent WinUI class: Microsoft.UI.Xaml.Media.Animation.Timeline.
public ref class Timeline : DependencyObject
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)] /// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] /// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] class Timeline : DependencyObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)] [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] public class Timeline : DependencyObject
Public Class Timeline Inherits DependencyObject
Windows 10 (introduced in 10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced in v1.0)
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:
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 derived classes
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.
Theme animations: These are animations defined by the animation library that you use for common UI interactions.+ DragItemThemeAnimation
Theme transitions don't derive from Timeline, they derive from Transition.
Provides base class initialization behavior for Timeline -derived classes.
Equivalent WinUI constructor: Microsoft.UI.Xaml.Media.Animation.Timeline.Timeline.
Gets or sets a value that determines whether dependent animations should be permitted to run, throughout the app.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.AllowDependentAnimations.
Gets or sets a value that indicates whether the timeline plays in reverse after it completes a forward iteration.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.AutoReverse.
Identifies the AutoReverse dependency property.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.AutoReverseProperty.
Gets or sets the time at which this Timeline should begin.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.BeginTime.
Identifies the BeginTime dependency property.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.BeginTimeProperty.
Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.
Equivalent WinUI property: Microsoft.UI.Xaml.DependencyObject.Dispatcher.(Inherited from DependencyObject)
Gets or sets the length of time for which this timeline plays, not counting repetitions.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.Duration.
Identifies the Duration dependency property.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.DurationProperty.
Gets or sets a value that specifies how the animation behaves after it reaches the end of its active period.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.FillBehavior.
Identifies the FillBehavior dependency property.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.FillBehaviorProperty.
Gets or sets the repeating behavior of this timeline.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.RepeatBehavior.
Identifies the RepeatBehavior dependency property.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.RepeatBehaviorProperty.
Gets or sets the rate, relative to its parent, at which time progresses for this Timeline.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.SpeedRatio.
Identifies for the SpeedRatio dependency property.
Equivalent WinUI property: Microsoft.UI.Xaml.Media.Animation.Timeline.SpeedRatioProperty.
Occurs when the Storyboard object has completed playing.
Equivalent WinUI event: Microsoft.UI.Xaml.Media.Animation.Timeline.Completed.