次の方法で共有


MediaControl.PlayPressed イベント

定義

注意

mediaControl は、Windows 8.1後のリリースで変更または使用できない場合があります。 代わりに、 SystemMediaTransportControls を使用します

Play コマンドがアプリケーションに発行されたときに発生するイベント。

/// [add: Windows.Foundation.Metadata.Deprecated("MediaControl may be altered or unavailable for releases after Windows 8.1. Instead, use SystemMediaTransportControls.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Media.MediaControlContract)]
/// [remove: Windows.Foundation.Metadata.Deprecated("MediaControl may be altered or unavailable for releases after Windows 8.1. Instead, use SystemMediaTransportControls.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Media.MediaControlContract)]
// Register
static event_token PlayPressed(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
static void PlayPressed(event_token const* cookie) const;

// Revoke with event_revoker
static MediaControl::PlayPressed_revoker PlayPressed(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("MediaControl may be altered or unavailable for releases after Windows 8.1. Instead, use SystemMediaTransportControls.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Media.MediaControlContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("MediaControl may be altered or unavailable for releases after Windows 8.1. Instead, use SystemMediaTransportControls.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Media.MediaControlContract")]
// Register
static event_token PlayPressed(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
static void PlayPressed(event_token const* cookie) const;

// Revoke with event_revoker
static MediaControl::PlayPressed_revoker PlayPressed(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
[add: Windows.Foundation.Metadata.Deprecated("MediaControl may be altered or unavailable for releases after Windows 8.1. Instead, use SystemMediaTransportControls.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Media.MediaControlContract))]
[remove: Windows.Foundation.Metadata.Deprecated("MediaControl may be altered or unavailable for releases after Windows 8.1. Instead, use SystemMediaTransportControls.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Media.MediaControlContract))]
public static event System.EventHandler<object> PlayPressed;
[add: Windows.Foundation.Metadata.Deprecated("MediaControl may be altered or unavailable for releases after Windows 8.1. Instead, use SystemMediaTransportControls.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Media.MediaControlContract")]
[remove: Windows.Foundation.Metadata.Deprecated("MediaControl may be altered or unavailable for releases after Windows 8.1. Instead, use SystemMediaTransportControls.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Media.MediaControlContract")]
public static event System.EventHandler<object> PlayPressed;
function onPlayPressed(eventArgs) { /* Your code */ }
Windows.Media.MediaControl.addEventListener("playpressed", onPlayPressed);
Windows.Media.MediaControl.removeEventListener("playpressed", onPlayPressed);
- or -
Windows.Media.MediaControl.onplaypressed = onPlayPressed;
Public Shared Custom Event PlayPressed As EventHandler(Of Object) 

イベントの種類

属性

適用対象

こちらもご覧ください