PowerManager.EffectivePowerModeChanged Event

Definition

Raised when the effective power mode of the device has changed.

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

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

// Revoke with event_revoker
static PowerManager::EffectivePowerModeChanged_revoker EffectivePowerModeChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> EffectivePowerModeChanged;
function onEffectivePowerModeChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("effectivepowermodechanged", onEffectivePowerModeChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("effectivepowermodechanged", onEffectivePowerModeChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.oneffectivepowermodechanged = onEffectivePowerModeChanged;
Public Shared Custom Event EffectivePowerModeChanged As EventHandler(Of Object) 

Event Type

Remarks

To get the current effective power mode in response to this event, use the EffectivePowerMode property.

Applies to

See also