Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-play-media-with-animations.md
T
Andy De George da363692ff Initial WPF content migrated (#17)
* 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
2020-09-04 09:46:28 -07:00

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
multimedia [WPF], playback with animations
playback of media [WPF], with animations
animation [WPF], media playback with
media [WPF], playback with animations
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