Battery Class

Definition

Provides information about the status of the phone's battery.

public ref class Battery sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Phone.PhoneContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class Battery final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Phone.PhoneContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class Battery
Public NotInheritable Class Battery
Inheritance
Object Platform::Object IInspectable Battery
Attributes

Windows requirements

Device family
Windows Mobile Extension SDK (introduced in 10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced in v1.0)

Remarks

Use the GetDefault method to retrieve an instance of the Battery class.

Properties

RemainingChargePercent

Gets a value that indicates the percentage of the charge remaining on the phone's battery.

RemainingDischargeTime

Gets a value that estimates how long is left until the phone's battery is fully discharged. Each unit value represents 100 nanoseconds.

Methods

GetDefault()

Gets the default Battery object for the phone.

Events

RemainingChargePercentChanged

Occurs when the value of RemainingChargePercent decreases by 1%.

Applies to