Dela via


BatteryStatus Enum

Definition

Indicates the status of the battery.

public enum class BatteryStatus
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class BatteryStatus
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum BatteryStatus
var value = Windows.System.Power.BatteryStatus.notPresent
Public Enum BatteryStatus
Inheritance
BatteryStatus
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Name Value Description
NotPresent 0

The battery or battery controller is not present.

Discharging 1

The battery is discharging.

Idle 2

The battery is idle.

Charging 3

The battery is charging.

Remarks

This enumeration is used as part of the BatteryReport class to provide information about a Battery object.

If the battery controller is removed after you create a Battery object, the Status will be NotPresent.

An Idle status occurs when the charge rate is zero. The battery isn’t charging, but it is maintaining its current level of charge.

Applies to