Timeline Timeline Timeline Timeline Class

Definition

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.

public : class Timeline : DependencyObject, ITimeline
struct winrt::Windows::UI::Xaml::Media::Animation::Timeline : DependencyObject, ITimeline
public class Timeline : DependencyObject, ITimeline
Public Class Timeline Inherits DependencyObject Implements ITimeline
Inheritance
TimelineTimelineTimelineTimeline
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

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:

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 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:

Note

Theme transitions don't derive from Timeline, they derive from Transition.

Constructors

Timeline() Timeline() Timeline() Timeline()

Provides base class initialization behavior for Timeline -derived classes.

Properties

AllowDependentAnimations AllowDependentAnimations AllowDependentAnimations AllowDependentAnimations

Gets or sets a value that determines whether dependent animations should be permitted to run, throughout the app.

AutoReverse AutoReverse AutoReverse AutoReverse

Gets or sets a value that indicates whether the timeline plays in reverse after it completes a forward iteration.

AutoReverseProperty AutoReverseProperty AutoReverseProperty AutoReverseProperty

Identifies the AutoReverse dependency property.

BeginTime BeginTime BeginTime BeginTime

Gets or sets the time at which this Timeline should begin.

BeginTimeProperty BeginTimeProperty BeginTimeProperty BeginTimeProperty

Identifies the BeginTime dependency property.

Dispatcher Dispatcher Dispatcher Dispatcher

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.

(Inherited from DependencyObject)
Duration Duration Duration Duration

Gets or sets the length of time for which this timeline plays, not counting repetitions.

DurationProperty DurationProperty DurationProperty DurationProperty

Identifies the Duration dependency property.

FillBehavior FillBehavior FillBehavior FillBehavior

Gets or sets a value that specifies how the animation behaves after it reaches the end of its active period.

FillBehaviorProperty FillBehaviorProperty FillBehaviorProperty FillBehaviorProperty

Identifies the FillBehavior dependency property.

RepeatBehavior RepeatBehavior RepeatBehavior RepeatBehavior

Gets or sets the repeating behavior of this timeline.

RepeatBehaviorProperty RepeatBehaviorProperty RepeatBehaviorProperty RepeatBehaviorProperty

Identifies the RepeatBehavior dependency property.

SpeedRatio SpeedRatio SpeedRatio SpeedRatio

Gets or sets the rate, relative to its parent, at which time progresses for this Timeline.

SpeedRatioProperty SpeedRatioProperty SpeedRatioProperty SpeedRatioProperty

Identifies for the SpeedRatio dependency property.

Events

Completed Completed Completed Completed

Occurs when the Storyboard object has completed playing.

Methods

ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)
GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)
GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)
ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)

See Also