Storyboard Class

Definition

A container timeline that provides object and property targeting information for its child animations.

public class Storyboard : System.Windows.Media.Animation.ParallelTimeline
Inheritance

Remarks

Interactively Controlling Storyboards

A controllable storyboard can pause, resume, seek, stop, and be removed. To make a storyboard controllable in markup, you specify the Name property of the BeginStoryboard object that creates it; for an example, see How to: Use Event Triggers to Control a Storyboard After It Starts. To make a storyboard controllable in code, you must use the appropriate overload of the storyboard's Begin method and specify true to make it controllable. For an example, see How to: Control a Storyboard After It Starts.

Data Binding and Animating Timelines

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 activated, copies are made of the timeline and its child timelines. These copies are frozen (made read-only) and Clock objects are created from them. These clocks do the actual work of animating the targeted properties. If a timeline is data bound or animated, a snapshot of its current values is made when its clock is 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 re-created. Clocks are not re-created 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 applied an animation directly to a property using the BeginAnimation method, call the BeginAnimation method again and pass it the animation that has been modified.

  • 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 created clocks.

For an example of a data bound animation, see Key Spline Animation Sample .

Constructors

Storyboard()

Initializes a new instance of the Storyboard class.

Fields

TargetNameProperty

Identifies the System.Windows.Media.Animation.Storyboard.TargetName attached property.

TargetProperty

Identifies the System.Windows.Media.Animation.Storyboard.Target attached property.

TargetPropertyProperty

Identifies the TargetProperty attached property.

Methods

Begin(FrameworkElement, FrameworkTemplate, HandoffBehavior, Boolean)

Applies the animations associated with this Storyboard to their targets within the specified template and initiates them.

Begin(FrameworkElement, HandoffBehavior, Boolean)

Applies the animations associated with this Storyboard to their targets and initiates them.

Begin(FrameworkElement, FrameworkTemplate, HandoffBehavior)

Applies the animations associated with this Storyboard to their targets within the specified template and initiates them.

Begin(FrameworkElement, FrameworkTemplate, Boolean)

Applies the animations associated with this Storyboard to their targets within the specified template and initiates them.

Begin(FrameworkContentElement, HandoffBehavior, Boolean)

Applies the animations associated with this Storyboard to their targets and initiates them, using the specified HandoffBehavior.

Begin(FrameworkElement, FrameworkTemplate)

Applies the animations associated with this Storyboard to their targets within the specified template and initiates them.

Begin(FrameworkElement, HandoffBehavior)

Applies the animations associated with this Storyboard to their targets and initiates them, using the specified HandoffBehavior.

Begin(FrameworkContentElement, HandoffBehavior)

Applies the animations associated with this Storyboard to their targets and initiates them, using the specified HandoffBehavior.

Begin(FrameworkContentElement, Boolean)

Applies the animations associated with this Storyboard to their targets and initiates them.

Begin(FrameworkElement)

Applies the animations associated with this Storyboard to their targets and initiates them.

Begin(FrameworkContentElement)

Applies the animations associated with this Storyboard to their targets and initiates them.

Begin()

Applies the animations associated with this Storyboard to their targets and initiates them.

Begin(FrameworkElement, Boolean)

Applies the animations associated with this Storyboard to their targets and initiates them.

Clone()

Creates a modifiable clone of this Storyboard, making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values.

CreateInstanceCore()

Creates a new instance of the Storyboard class.

GetCurrentGlobalSpeed(FrameworkElement)

Retrieves the CurrentGlobalSpeed of the Clock that was created for this Storyboard.

GetCurrentGlobalSpeed()

Retrieves the CurrentGlobalSpeed of the Clock that was created for this Storyboard.

GetCurrentGlobalSpeed(FrameworkContentElement)

Retrieves the CurrentGlobalSpeed of the Clock that was created for this Storyboard.

GetCurrentIteration()

Retrieves the CurrentIteration of the Clock that was created for this Storyboard.

GetCurrentIteration(FrameworkContentElement)

Retrieves the CurrentIteration of the Clock that was created for this Storyboard.

GetCurrentIteration(FrameworkElement)

Retrieves the CurrentIteration of the Clock that was created for this Storyboard.

GetCurrentProgress()

Retrieves the CurrentProgress of the Clock that was created for this Storyboard.

GetCurrentProgress(FrameworkContentElement)

Retrieves the CurrentProgress of the Clock that was created for this Storyboard.

GetCurrentProgress(FrameworkElement)

Retrieves the CurrentProgress of the Clock that was created for this Storyboard.

GetCurrentState()

Retrieves the CurrentState of the Clock that was created for this Storyboard.

GetCurrentState(FrameworkContentElement)

Retrieves the CurrentState of the Clock that was created for this Storyboard.

GetCurrentState(FrameworkElement)

Retrieves the CurrentState of the Clock that was created for this Storyboard.

GetCurrentTime()

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

GetCurrentTime(FrameworkContentElement)

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

GetCurrentTime(FrameworkElement)

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

GetIsPaused(FrameworkContentElement)

Retrieves a value that indicates whether the Clock that was created for this Storyboard is paused.

GetIsPaused()

Retrieves a value that indicates whether the Clock that was created for this Storyboard is paused.

GetIsPaused(FrameworkElement)

Retrieves a value that indicates whether the Clock that was created for this Storyboard is paused.

GetTarget(DependencyObject)

Retrieves the System.Windows.Media.Animation.Storyboard.Target value of the specified Timeline.

GetTargetName(DependencyObject)

Retrieves the System.Windows.Media.Animation.Storyboard.TargetName value of the specified Timeline.

GetTargetProperty(DependencyObject)

Retrieves the TargetProperty value of the specified Timeline.

Pause()

Pauses the Clock that was created for this Storyboard.

Pause(FrameworkContentElement)

Pauses the Clock of the specified FrameworkContentElement associated with this Storyboard.

Pause(FrameworkElement)

Pauses the Clock of the specified FrameworkElement associated with this Storyboard.

Remove()

Removes the Clock objects that were created for this Storyboard. Animations that belong to this Storyboard no longer affect the properties they once animated, regardless of their FillBehavior setting.

Remove(FrameworkContentElement)

Removes the Clock objects that were created for this Storyboard. Animations that belong to this Storyboard no longer affect the properties they once animated, regardless of their FillBehavior setting.

Remove(FrameworkElement)

Removes the Clock objects that were created for this Storyboard. Animations that belong to this Storyboard no longer affect the properties they once animated, regardless of their FillBehavior setting.

Resume(FrameworkElement)

Resumes the Clock that was created for this Storyboard.

Resume()

Resumes the Clock that was created for this Storyboard.

Resume(FrameworkContentElement)

Resumes the Clock that was created for this Storyboard.

Seek(TimeSpan)

Seeks this Storyboard to the specified position. The Storyboard performs the requested seek when the next clock tick occurs.

Seek(TimeSpan, TimeSeekOrigin)

Seeks this Storyboard to the specified position. The Storyboard performs the requested seek when the next clock tick occurs.

Seek(FrameworkContentElement, TimeSpan, TimeSeekOrigin)

Seeks this Storyboard to the specified position. The Storyboard performs the requested seek when the next clock tick occurs.

Seek(FrameworkElement, TimeSpan, TimeSeekOrigin)

Seeks this Storyboard to the specified position. The Storyboard performs the requested seek when the next clock tick occurs.

SeekAlignedToLastTick(FrameworkElement, TimeSpan, TimeSeekOrigin)

Seeks this Storyboard to a new position immediately (synchronously).

SeekAlignedToLastTick(FrameworkContentElement, TimeSpan, TimeSeekOrigin)

Seeks this Storyboard to a new position immediately (synchronously).

SeekAlignedToLastTick(TimeSpan, TimeSeekOrigin)

Seeks this Storyboard to a new position immediately (synchronously).

SeekAlignedToLastTick(TimeSpan)

Seeks this Storyboard to a new position immediately (synchronously).

SetSpeedRatio(Double)

Sets the interactive speed ratio for the Clock that was created for this Storyboard.

SetSpeedRatio(FrameworkContentElement, Double)

Sets the interactive speed ratio of the Clock that was created for this Storyboard.

SetSpeedRatio(FrameworkElement, Double)

Sets the interactive speed ratio of the Clock that was created for this Storyboard.

SetTarget(DependencyObject, DependencyObject)

Makes the specified Timeline target the dependency object.

SetTargetName(DependencyObject, String)

Makes the specified Timeline target the dependency object with the specified name.

SetTargetProperty(DependencyObject, PropertyPath)

Makes the specified Timeline target the specified dependency property.

SkipToFill()

Advances the current time of this storyboard's Clock to the end of its active period.

SkipToFill(FrameworkContentElement)

Advances the current time of this storyboard's Clock to the end of its active period.

SkipToFill(FrameworkElement)

Advances the current time of this storyboard's Clock to the end of its active period.

Stop()

Stops the Clock that was created for this Storyboard.

Stop(FrameworkContentElement)

Stops the Clock that was created for this Storyboard.

Stop(FrameworkElement)

Stops the Clock that was created for this Storyboard.

Equals(Object, Object) Inherited from Object
GetType() Inherited from Object
MemberwiseClone() Inherited from Object
ReferenceEquals(Object, Object) Inherited from Object
ToString() Inherited from Object
ClearValue(DependencyProperty) Inherited from DependencyObject
ClearValue(DependencyPropertyKey) Inherited from DependencyObject
CoerceValue(DependencyProperty) Inherited from DependencyObject
DependencyObjectType Inherited from DependencyObject
Equals(Object) Inherited from DependencyObject
GetHashCode() Inherited from DependencyObject
GetLocalValueEnumerator() Inherited from DependencyObject
GetValue(DependencyProperty) Inherited from DependencyObject
InvalidateProperty(DependencyProperty) Inherited from DependencyObject
IsSealed Inherited from DependencyObject
ReadLocalValue(DependencyProperty) Inherited from DependencyObject
SetCurrentValue(DependencyProperty, Object) Inherited from DependencyObject
SetValue(DependencyProperty, Object) Inherited from DependencyObject
SetValue(DependencyPropertyKey, Object) Inherited from DependencyObject
ShouldSerializeProperty(DependencyProperty) Inherited from DependencyObject
CanFreeze Inherited from Freezable
Changed Inherited from Freezable
CloneCore(Freezable) Inherited from Freezable
CloneCurrentValueCore(Freezable) Inherited from Freezable
CreateInstance() Inherited from Freezable
Freeze() Inherited from Freezable
Freeze(Freezable, Boolean) Inherited from Freezable
GetAsFrozen() Inherited from Freezable
GetCurrentValueAsFrozen() Inherited from Freezable
IsFrozen Inherited from Freezable
OnChanged() Inherited from Freezable
OnFreezablePropertyChanged(DependencyObject, DependencyObject) Inherited from Freezable
OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) Inherited from Freezable
OnPropertyChanged(DependencyPropertyChangedEventArgs) Inherited from Freezable
ReadPreamble() Inherited from Freezable
WritePostscript() Inherited from Freezable
WritePreamble() Inherited from Freezable
ApplyAnimationClock(DependencyProperty, AnimationClock) Inherited from Animatable
ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior) Inherited from Animatable
BeginAnimation(DependencyProperty, AnimationTimeline) Inherited from Animatable
BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior) Inherited from Animatable
GetAnimationBaseValue(DependencyProperty) Inherited from Animatable
HasAnimatedProperties Inherited from Animatable
ShouldSerializeStoredWeakReference(DependencyObject) Inherited from Animatable
CloneCurrentValue() Inherited from ParallelTimeline
GetNaturalDurationCore(Clock) Inherited from ParallelTimeline
SlipBehavior Inherited from ParallelTimeline
SlipBehaviorProperty Inherited from ParallelTimeline
AccelerationRatio Inherited from Timeline
AccelerationRatioProperty Inherited from Timeline
AutoReverse Inherited from Timeline
AutoReverseProperty Inherited from Timeline
BeginTime Inherited from Timeline
BeginTimeProperty Inherited from Timeline
Completed Inherited from Timeline
CreateClock(Boolean) Inherited from Timeline
CurrentGlobalSpeedInvalidated Inherited from Timeline
CurrentStateInvalidated Inherited from Timeline
CurrentTimeInvalidated Inherited from Timeline
DecelerationRatio Inherited from Timeline
DecelerationRatioProperty Inherited from Timeline
DesiredFrameRateProperty Inherited from Timeline
Duration Inherited from Timeline
DurationProperty Inherited from Timeline
FillBehavior Inherited from Timeline
FillBehaviorProperty Inherited from Timeline
FreezeCore(Boolean) Inherited from Timeline
GetAsFrozenCore(Freezable) Inherited from Timeline
GetCurrentValueAsFrozenCore(Freezable) Inherited from Timeline
GetDesiredFrameRate(Timeline) Inherited from Timeline
GetNaturalDuration(Clock) Inherited from Timeline
Name Inherited from Timeline
NameProperty Inherited from Timeline
RemoveRequested Inherited from Timeline
RepeatBehavior Inherited from Timeline
RepeatBehaviorProperty Inherited from Timeline
SetDesiredFrameRate(Timeline, Nullable<Int32>) Inherited from Timeline
SpeedRatio Inherited from Timeline
SpeedRatioProperty Inherited from Timeline
AddChild(Object) Inherited from TimelineGroup
AddText(String) Inherited from TimelineGroup
AllocateClock() Inherited from TimelineGroup
Children Inherited from TimelineGroup
ChildrenProperty Inherited from TimelineGroup
CreateClock() Inherited from TimelineGroup
IAddChild.AddChild(Object) Inherited from TimelineGroup
IAddChild.AddText(String) Inherited from TimelineGroup
CheckAccess() Inherited from DispatcherObject
Dispatcher Inherited from DispatcherObject
VerifyAccess() Inherited from DispatcherObject

Applies to