GlobalSystemMediaTransportControlsSessionManager.CurrentSessionChanged 事件

定义

在当前会话发生更改时发生。 这是系统认为用户最可能希望控制的会话。

// Register
event_token CurrentSessionChanged(TypedEventHandler<GlobalSystemMediaTransportControlsSessionManager, CurrentSessionChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void CurrentSessionChanged(event_token const* cookie) const;

// Revoke with event_revoker
GlobalSystemMediaTransportControlsSessionManager::CurrentSessionChanged_revoker CurrentSessionChanged(auto_revoke_t, TypedEventHandler<GlobalSystemMediaTransportControlsSessionManager, CurrentSessionChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<GlobalSystemMediaTransportControlsSessionManager,CurrentSessionChangedEventArgs> CurrentSessionChanged;
function onCurrentSessionChanged(eventArgs) { /* Your code */ }
globalSystemMediaTransportControlsSessionManager.addEventListener("currentsessionchanged", onCurrentSessionChanged);
globalSystemMediaTransportControlsSessionManager.removeEventListener("currentsessionchanged", onCurrentSessionChanged);
- or -
globalSystemMediaTransportControlsSessionManager.oncurrentsessionchanged = onCurrentSessionChanged;
Public Custom Event CurrentSessionChanged As TypedEventHandler(Of GlobalSystemMediaTransportControlsSessionManager, CurrentSessionChangedEventArgs) 

事件类型

Windows 要求

应用功能
globalMediaControl

适用于