共用方式為


SystemMediaTransportControls.ShuffleEnabledChangeRequested 事件

定義

發生于使用者修改 SystemMediaTransportControls 隨機顯示狀態時。

// Register
event_token ShuffleEnabledChangeRequested(TypedEventHandler<SystemMediaTransportControls, ShuffleEnabledChangeRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
SystemMediaTransportControls::ShuffleEnabledChangeRequested_revoker ShuffleEnabledChangeRequested(auto_revoke_t, TypedEventHandler<SystemMediaTransportControls, ShuffleEnabledChangeRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<SystemMediaTransportControls,ShuffleEnabledChangeRequestedEventArgs> ShuffleEnabledChangeRequested;
function onShuffleEnabledChangeRequested(eventArgs) { /* Your code */ }
systemMediaTransportControls.addEventListener("shuffleenabledchangerequested", onShuffleEnabledChangeRequested);
systemMediaTransportControls.removeEventListener("shuffleenabledchangerequested", onShuffleEnabledChangeRequested);
- or -
systemMediaTransportControls.onshuffleenabledchangerequested = onShuffleEnabledChangeRequested;
Public Custom Event ShuffleEnabledChangeRequested As TypedEventHandler(Of SystemMediaTransportControls, ShuffleEnabledChangeRequestedEventArgs) 

事件類型

備註

註冊此事件會導致 應用程式在 SystemMediaTransportControls 隨機顯示狀態變更時收到通知。 應用程式可以根據要求變更其隨機顯示狀態,或忽略要求並更新 SystemMediaTransportControls ,方法是將 ShuffleEnabled 屬性設定為反映應用程式實際隨機顯示狀態的值。

適用於