Property Value

A finite value greater than 0 that describes the rate at which time progresses for this timeline, relative to the speed of the timeline's parent or, if this is a root timeline, the default timeline speed. The default value is 1.

A timeline's SpeedRatio setting does not have an effect on its BeginTime; that time is relative to the timeline's parent or, if the timeline is a root timeline, the moment at which the timeline's clock was begun.

A timeline's SpeedRatio property controls its rate of progress, relative to its parent. If the timeline is a root, its SpeedRatio is relative to the default timeline speed. The following example shows several timelines with different SpeedRatio settings.

<!-- This example shows how to use the SpeedRatio property
to make animations speed up or slow down. --><Pagexmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"WindowTitle="Speed Example"><StackPanel><!-- The rectangles to animate. --><RectangleName="DefaultSpeedRectangle"Width="20"Height="20"Fill="Blue"/><RectangleName="FasterRectangle"Width="20"Height="20"Fill="Blue"/><RectangleName="SlowerRectangle"Width="20"Height="20"Fill="Blue"/><RectangleName="NestedTimelinesExampleRectangle"Width="20"Height="20"Fill="Blue"/><!-- Create a button to start the animations. --><ButtonMargin="0,30,0,0"HorizontalAlignment="Left">Start Animations
<Button.Triggers><EventTriggerRoutedEvent="Button.Click"><BeginStoryboard><Storyboard><!-- This animation progresses at the same rate as its parent. --><DoubleAnimationStoryboard.TargetName="DefaultSpeedRectangle"Storyboard.TargetProperty="Width"From="20"To="400"Duration="0:0:2"SpeedRatio="1"/><!-- This animation progresses twice as fast as its parent. --><DoubleAnimationStoryboard.TargetName="FasterRectangle"Storyboard.TargetProperty="Width"From="20"To="400"Duration="0:0:2"SpeedRatio="2"/><!-- This animation progresses at half the rate of its parent. --><DoubleAnimationStoryboard.TargetName="SlowerRectangle"Storyboard.TargetProperty="Width"From="20"To="400"Duration="0:0:2"SpeedRatio="0.5"/><ParallelTimelineSpeedRatio="2"><ParallelTimelineSpeedRatio="2"><!-- This animation progresses eight times faster
than normal, because of its SpeedRatio settings
and the SpeedRatio settings on its parents. --><DoubleAnimationStoryboard.TargetName="NestedTimelinesExampleRectangle"Storyboard.TargetProperty="Width"From="20"To="400"Duration="0:0:2"SpeedRatio="2"/></ParallelTimeline></ParallelTimeline></Storyboard></BeginStoryboard></EventTrigger></Button.Triggers></Button></StackPanel></Page>