* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
2.0 KiB
title, ms.date, helpviewer_keywords, ms.assetid
| title | ms.date | helpviewer_keywords | ms.assetid | ||||
|---|---|---|---|---|---|---|---|
| How to: Play Media with Animations | 03/30/2017 |
|
8982b7b7-1c6c-4b24-8801-b328862975f5 |
How to: Play Media with Animations
This example shows how to play media and animations at the same time by using the xref:System.Windows.Media.MediaTimeline and xref:System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames classes in the same xref:System.Windows.Media.Animation.Storyboard.
Example
You can use one or more xref:System.Windows.Media.MediaTimeline objects in a xref:System.Windows.Media.Animation.Storyboard together with other xref:System.Windows.Media.Animation.Timeline objects, such as animations.
The following example sets the xref:System.Windows.Media.Animation.ParallelTimeline.SlipBehavior%2A property of the xref:System.Windows.Media.Animation.Storyboard to a value of Slip, which specifies that the animation does not progress until the media (video in this example) progresses. This functionality might be needed if media playback is delayed because of loading time.
[!code-xamlMediaGallery_snippet#MediaTimelinePlusAnimationExampleWholePage]
See also
- xref:System.Windows.Media.MediaTimeline
- xref:System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames
- xref:System.Windows.Media.Animation.Storyboard
- xref:System.Windows.Media.Animation.ParallelTimeline.SlipBehavior%2A
- How-to Topics
- Storyboards Overview
- Key-Frame Animations Overview
- Animation Overview
- Graphics and Multimedia