共用方式為


SoundLevelBroker.SoundLevelChanged 事件

定義

發生于系統原則變更應用程式的音效等級時。

// Register
static event_token SoundLevelChanged(EventHandler<IInspectable> const& handler) const;

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

// Revoke with event_revoker
static SoundLevelBroker::SoundLevelChanged_revoker SoundLevelChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> SoundLevelChanged;
function onSoundLevelChanged(eventArgs) { /* Your code */ }
Windows.Media.Core.Preview.SoundLevelBroker.addEventListener("soundlevelchanged", onSoundLevelChanged);
Windows.Media.Core.Preview.SoundLevelBroker.removeEventListener("soundlevelchanged", onSoundLevelChanged);
- or -
Windows.Media.Core.Preview.SoundLevelBroker.onsoundlevelchanged = onSoundLevelChanged;
Public Shared Custom Event SoundLevelChanged As EventHandler(Of Object) 

事件類型

備註

在此事件的處理常式中,檢查 SoundLevelBroker.SoundLevel 屬性以取得新的音效等級。

適用於