Share via


SoundLevelBroker.SoundLevelChanged Event

Definition

Occurs when the system policy changes the sound level of the app.

// 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) 

Event Type

Remarks

In the handler for this event, check the SoundLevelBroker.SoundLevel property to get the new sound level.

Applies to