Timeline class

Applies to Windows and Windows Phone

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.

Inheritance

Object
  DependencyObject
    Timeline

Syntax


Public Class Timeline
    Inherits DependencyObject

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The Timeline class has these types of members:

Constructors

The Timeline class has these constructors.

ConstructorDescription
Timeline Provides base class initialization behavior for Timeline-derived classes.

 

Events

The Timeline class has these events.

EventDescription
Completed Occurs when the Storyboard object has completed playing.

 

Methods

The Timeline class has these methods. It also inherits methods from the Object class.

MethodDescription
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject)

 

Properties

The Timeline class has these properties.

PropertyAccess typeDescription

AllowDependentAnimations

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

AutoReverse

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

AutoReverseProperty

Read-onlyIdentifies the AutoReverse dependency property.

BeginTime

Read/writeGets or sets the time at which this Timeline should begin.

BeginTimeProperty

Read-onlyIdentifies the BeginTime dependency property.

Dispatcher

Read-onlyGets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject)

Duration

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

DurationProperty

Read-onlyIdentifies the Duration dependency property.

FillBehavior

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

FillBehaviorProperty

Read-onlyIdentifies the FillBehavior dependency property.

RepeatBehavior

Read/writeGets or sets the repeating behavior of this timeline.

RepeatBehaviorProperty

Read-onlyIdentifies the RepeatBehavior dependency property.

SpeedRatio

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

SpeedRatioProperty

Read-onlyIdentifies for the SpeedRatio dependency property.

 

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:

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Media.Animation
Windows::UI::Xaml::Media::Animation [C++]

Metadata

Windows.winmd

See also

DependencyObject
Storyboard
Storyboarded animations
Storyboarded animations for visual states
Key-frame animations and easing function animations

 

 

Show:
© 2014 Microsoft