Share via


MediaFailedRoutedEventArgs Class

Definition

Provides event data for the MediaElement.MediaFailed event.

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)]
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)]
public sealed class MediaFailedRoutedEventArgs : ExceptionRoutedEventArgs
Public NotInheritable Class MediaFailedRoutedEventArgs
Inherits ExceptionRoutedEventArgs
Inheritance
Object Platform::Object IInspectable RoutedEventArgs ExceptionRoutedEventArgs MediaFailedRoutedEventArgs
Attributes

Remarks

MediaFailedRoutedEventArgs extends ExceptionRoutedEventArgs by adding the ErrorTrace property. In a handler for 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