mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-04 09:06:04 +02:00
* 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
1.2 KiB
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 |
|
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]