MediaFailedRoutedEventArgs Class

Definition

Provides event data for media failed events.

Equivalent WinUI class: Microsoft.UI.Xaml.MediaFailedRoutedEventArgs.

public ref class MediaFailedRoutedEventArgs sealed : ExceptionRoutedEventArgs
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 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(Windows.Foundation.UniversalApiContract), 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 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

MediaFailedRoutedEventArgs is the event data for the MediaFailed event. 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.

Equivalent WinUI property: Microsoft.UI.Xaml.ExceptionRoutedEventArgs.ErrorMessage.

(Inherited from ExceptionRoutedEventArgs)
ErrorTrace

Gets the trace information for a media failed event.

Equivalent WinUI property: Microsoft.UI.Xaml.MediaFailedRoutedEventArgs.ErrorTrace.

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.

Equivalent WinUI property: Microsoft.UI.Xaml.RoutedEventArgs.OriginalSource.

(Inherited from RoutedEventArgs)

Applies to

See also