PowerManager.EffectivePowerModeChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.