MediaFailedRoutedEventArgs Class

Definition

Provides event data for media failed events.

public ref class MediaFailedRoutedEventArgs sealed : ExceptionRoutedEventArgs
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class MediaFailedRoutedEventArgs final : ExceptionRoutedEventArgs
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
public sealed class MediaFailedRoutedEventArgs : ExceptionRoutedEventArgs
Public NotInheritable Class MediaFailedRoutedEventArgs
Inherits ExceptionRoutedEventArgs
Inheritance
MediaFailedRoutedEventArgs
Attributes
Windows.Foundation.Metadata.ContractVersionAttribute Windows.Foundation.Metadata.MarshalingBehaviorAttribute Windows.Foundation.Metadata.ThreadingAttribute Windows.Foundation.Metadata.WebHostHiddenAttribute

Remarks

MediaFailedRoutedEventArgs is the event data for the @"Microsoft.UI.Xaml.Controls.MediaElement.MediaFailed?text=MediaFailed" event. MediaFailedRoutedEventArgs extends ExceptionRoutedEventArgs by adding the ErrorTrace property. In a handler for @"Microsoft.UI.Xaml.Controls.MediaElement.MediaFailed?text=MediaFailed", cast the ExceptionRoutedEventArgs data as MediaFailedRoutedEventArgs so that you can use the ErrorTrace information. Otherwise, if you're only interested in the message, you can access ErrorMessage without casting.

Properties

ErrorMessage

Gets the message component of the exception, as a string.

(Inherited from ExceptionRoutedEventArgs)
ErrorTrace

Gets the trace information for a media failed event.

OriginalSource

Gets a reference to the object that raised the event. This is often a template part of a control rather than an element that was declared in your app UI.

(Inherited from RoutedEventArgs)

Applies to

See also