ParallelTimeline.SlipBehavior Property

Gets or sets a value that specifies how this timeline will behave when one or more of its Timeline children slips.

Namespace:  System.Windows.Media.Animation
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public SlipBehavior SlipBehavior { get; set; }
<object SlipBehavior="SlipBehavior" .../>

Property Value

Type: System.Windows.Media.Animation.SlipBehavior
A value that indicates how this timeline will behave when one or more of its Timeline children slips. The default value is Grow.

Identifier field

SlipBehaviorProperty

Metadata properties set to true

None

It is often desirable to synchronize animations and media. However, this is complicated by the fact that media playback can be delayed by loading or buffering making it difficult to reliably play an animation along with media. The SlipBehavior property is used to determine what happens when media and animations are played together. A value of Grow (default) specifies that animation timelines do not need to be synced and will play when specified regardless of the state of other media in the timeline. A value of Slip on the other hand, specifies that an animation will wait (slip) until media is ready to play. The diagrams below illustrate this behavior.

This Storyboard plays a video and an animation. When SlipBehavior is set to Grow and the Duration property of the Storyboard is set to Automatic, the Storyboard grows to play all media and animations.

Diagram: Key for SlipBehavior diagramDiagram: SlipBehavior property value of Grow

This Storyboard has a SlipBehavior of Grow and a Duration of 5 seconds which gives media and animations 5 seconds to play regardless of how much they slip.

Diagram: SlipBehavior property value of Grow

This Storyboard has a SlipBehavior of Slip. Note that the DoubleAnimation (and any other non-media children of the Storyboard) does not progress unless the media timeline is also progressing. If the media takes a while to load, or if it is buffering, the animation will wait (slips) with it. This allows animations to synchronize with a single media file.

SlipBehavior diagram for media and animation

This Storyboard has a SlipBehavior of Slip and a Duration of 5 seconds. In this scenario, the media file and animation are guaranteed to play for 5 seconds.

Diagram: SlipBehavior property of a Storyboard

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft