PowerManager PowerManager PowerManager PowerManager PowerManager Class

Definition

Provides access to information about a device's battery and power supply status.

public : static class PowerManager
static struct winrt::Windows::System::Power::PowerManager
public static class PowerManager
Public Shared Class PowerManager
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

BatteryStatus BatteryStatus BatteryStatus BatteryStatus BatteryStatus

Gets the device's battery status.

EnergySaverStatus EnergySaverStatus EnergySaverStatus EnergySaverStatus EnergySaverStatus

Gets the devices's battery saver status, indicating when to save energy.

PowerSupplyStatus PowerSupplyStatus PowerSupplyStatus PowerSupplyStatus PowerSupplyStatus

Gets the device's power supply status.

RemainingChargePercent RemainingChargePercent RemainingChargePercent RemainingChargePercent RemainingChargePercent

Gets the total percentage of charge remaining from all batteries connected to the device.

RemainingDischargeTime RemainingDischargeTime RemainingDischargeTime RemainingDischargeTime RemainingDischargeTime

Gets the total runtime remaining from all batteries connected to the device.

Events

BatteryStatusChanged BatteryStatusChanged BatteryStatusChanged BatteryStatusChanged BatteryStatusChanged

Occurs when BatteryStatus changes.

EnergySaverStatusChanged EnergySaverStatusChanged EnergySaverStatusChanged EnergySaverStatusChanged EnergySaverStatusChanged

Occurs when EnergySaverStatus changes.

PowerSupplyStatusChanged PowerSupplyStatusChanged PowerSupplyStatusChanged PowerSupplyStatusChanged PowerSupplyStatusChanged

Occurs when the PowerSupplyStatus changes.

RemainingChargePercentChanged RemainingChargePercentChanged RemainingChargePercentChanged RemainingChargePercentChanged RemainingChargePercentChanged

Occurs when RemainingChargePercent changes.

RemainingDischargeTimeChanged RemainingDischargeTimeChanged RemainingDischargeTimeChanged RemainingDischargeTimeChanged RemainingDischargeTimeChanged

Occurs when RemainingDischargeTime changes.