Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 853 Bytes

mediaelement_mediafailed.md

File metadata and controls

32 lines (20 loc) · 853 Bytes
-api-id -api-type
E:Windows.UI.Xaml.Controls.MediaElement.MediaFailed
winrt event

Windows.UI.Xaml.Controls.MediaElement.MediaFailed

-description

Occurs when there is an error associated with the media Source.

-xaml-syntax

<MediaElement MediaFailed="eventhandler" .../>

-remarks

It is a best practice to always handle the MediaFailed event and take appropriate action.

-examples

The following code creates a MediaFailed event handler that calls a helper function to retrieve the HRESULT from the event arguments.

[!code-csharpMediaPlayer_MediaFailedHandlers]

-see-also