Windows.UI.Xaml.Controls.MediaElement.MediaFailed
September 14, 2021 · View on GitHub
-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]