Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-trigger-media-playback-with-a-user-event.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

1.2 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Trigger Media Playback with a User Event 03/30/2017
synchronizing media playback with events [WPF]
playback of media [WPF], synchronizing with events
media [WPF], synchronizing playback with events
multimedia [WPF], synchronizing media playback with events
c4dbe632-6e7f-4d7f-9df5-98737a758bc3

How to: Trigger Media Playback with a User Event

This example shows how to synchronize media playback with an event.

Example

The following example uses the xref:System.Windows.Controls.MediaElement control and the xref:System.Windows.Media.MediaTimeline class to play a sound that occurs when the user clicks a xref:System.Windows.Controls.Button.

[!code-xamlMediaGallery_snippet#SoundFromUserEventExampleWholePage]

See also