Defines a segment of time.
Assembly: PresentationCore (in PresentationCore.dll)
Initializes a new instance of theclass.
Initializes a new instance of the BeginTime.class with the specified
|Timeline(Nullable<TimeSpan>, Duration, RepeatBehavior)|
Gets or sets a value specifying the percentage of the timeline's Duration spent accelerating the passage of time from zero to its maximum rate.
Gets or sets a value that indicates whether the timeline plays in reverse after it completes a forward iteration.
Gets or sets the time at which thisshould begin.
Gets a value that indicates whether the object can be made unmodifiable. (Inherited from Freezable.)
Gets or sets a value specifying the percentage of the timeline's Duration spent decelerating the passage of time from its maximum rate to zero.
Gets or sets the length of time for which this timeline plays, not counting repetitions.
Gets or sets a value that specifies how thebehaves after it reaches the end of its active period.
Gets a value that indicates whether the object is currently modifiable. (Inherited from Freezable.)
Gets a value that indicates whether this instance is currently sealed (read-only).(Inherited from DependencyObject.)
Gets or sets the name of this.
Gets or sets the repeating behavior of this timeline.
Gets or sets the rate, relative to its parent, at which time progresses for this.
Gets or sets the desired frame rate for this timeline and its child timelines.
Occurs when this timeline has completely finished playing: it will no longer enter its active period.
Occurs when the rate at which time progresses for the timeline's clock changes.
Occurs when the clock created for this timeline or one of its parent timelines is removed.
A timeline represents a segment of time. It provides properties that enable you to specify the length of that segment, when it should start, how many times it will repeat, how fast time progresses in that segment, and more.
Classes that inherit from the timeline class provide additional functionality, such as animation and media playback. The following are examples of some of the different types of specialized timelines available.
Animations: An AnimationTimeline is a type of timeline that produces output values. When you associate an animation with a property, the animation updates the property's value as it plays, thereby "animating" it. For an introduction to animations, see Animation Overview. For information about the different ways to apply animations, see the Property Animation Techniques Overview.
MediaTimelines: A MediaTimeline is a type of timeline that controls the playback of a media file.
ParallelTimelines: A ParallelTimeline is a type of timeline that groups other timelines.
Storyboards: A Storyboard is a special type of ParallelTimeline that provides object and property targeting information for the timelines it contains. For more information about Storyboard objects, see the Storyboards Overview.
Most timeline properties can be data bound or animated; however, because of the way the timing system works, data bound or animated timelines do not behave like other data bound or animated objects. To understand their behavior, it helps to understand what it means to activate a timeline.
When a timeline is applied, copies are made of the timeline and its child timelines. These copies are frozen (made read-only) and Clock objects are created from them. It's these clocks that do the actual work of animating the targeted properties. If a timeline was data bound or animated, a snapshot of its current values was made when its clock was created. Even though the original timeline might continue to change, its clock does not.
For a timeline to reflect data binding or animation changes, its clock must be regenerated. Clocks are not regenerated for you automatically. The following are several ways to apply timeline changes:
If the timeline is or belongs to a Storyboard, you can make it reflect changes by reapplying its storyboard using a BeginStoryboard or the Begin method. This has the side effect of also restarting the animation. In code, you can use the Seek method to advance the storyboard back to its previous position.
If you are working directly at the clock level, create and apply a new set of clocks and use them to replace the previous set of generated clocks.
For an example of a data bound animation, see the Key Spline Animation Sample .
Legacy Code Example
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.