MediaControl.PreviousTrackPressed 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
注意
mediaControl可能會在Windows 8.1之後變更或無法使用。 請改用 SystemMediaTransportControls。
發出 PreviousTrack 命令給應用程式時所引發的事件。
/// [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 PreviousTrackPressed(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void PreviousTrackPressed(event_token const* cookie) const;
// Revoke with event_revoker
static MediaControl::PreviousTrackPressed_revoker PreviousTrackPressed(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 PreviousTrackPressed(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void PreviousTrackPressed(event_token const* cookie) const;
// Revoke with event_revoker
static MediaControl::PreviousTrackPressed_revoker PreviousTrackPressed(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> PreviousTrackPressed;
[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> PreviousTrackPressed;
function onPreviousTrackPressed(eventArgs) { /* Your code */ }
Windows.Media.MediaControl.addEventListener("previoustrackpressed", onPreviousTrackPressed);
Windows.Media.MediaControl.removeEventListener("previoustrackpressed", onPreviousTrackPressed);
- or -
Windows.Media.MediaControl.onprevioustrackpressed = onPreviousTrackPressed;
Public Shared Custom Event PreviousTrackPressed As EventHandler(Of Object)
事件類型
- 屬性