MediaFailedRoutedEventArgs クラス

定義

MediaElement.MediaFailed イベントのイベント データを提供します。

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
継承
Object Platform::Object IInspectable RoutedEventArgs ExceptionRoutedEventArgs MediaFailedRoutedEventArgs
属性

注釈

MediaFailedRoutedEventArgsは、ErrorTrace プロパティを追加して ExceptionRoutedEventArgs を拡張します。 の MediaFailedハンドラーでは、情報を ExceptionRoutedEventArgs 使用できるように データを として MediaFailedRoutedEventArgs キャストします ErrorTrace 。 それ以外の場合は、メッセージにのみ関心がある場合は、キャストせずに ErrorMessage に アクセスできます。

プロパティ

ErrorMessage

例外のメッセージ コンポーネントを文字列として取得します。

(継承元 ExceptionRoutedEventArgs)
ErrorTrace

メディアに失敗したイベントのトレース情報を取得します。

OriginalSource

イベントを発生させたオブジェクトへの参照を取得します。 これは多くの場合、アプリ UI で宣言された要素ではなく、コントロールのテンプレート部分です。

(継承元 RoutedEventArgs)

適用対象

こちらもご覧ください