Of course, the most common thing to do with audio and video is to play it. There is one element for doing this, and it’s appropriately called
MediaElement is a
UIElement that displays a video (and plays its audio) much like
Image displays image content. It plays audio-only files, too, so
MediaElement is the XAML analog to HTML’s
video tags rolled into one.
You can set
MediaElement’s source to a
Uri that points an audio or video file, for example:
When you set
Source, the content is fetched asynchronously, and then either a
MediaFailed event gets raised.