Battery class

Applies to Windows Phone only

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

Syntax

Public NotInheritable Class Battery

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The Battery class has these types of members:

Events

The Battery class has these events.

EventDescription
RemainingChargePercentChanged Occurs when the value of RemainingChargePercent decreases by 1%.

 

Methods

The Battery class has these methods. It also inherits methods from the Object class.

MethodDescription
GetDefault Gets the default Battery object for the phone.

 

Properties

The Battery class has these properties.

PropertyAccess typeDescription

RemainingChargePercent

Read-onlyGets a value that indicates the percentage of the charge remaining on the phone's battery.

RemainingDischargeTime

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

 

Remarks

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

Requirements

Minimum supported client

None supported [Windows Store apps only]

Minimum supported server

None supported [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.Phone.Devices.Power
Windows::Phone::Devices::Power [C++]

Metadata

Windows.winmd

See also

Object

 

 

Community Additions

ADD
Show:
© 2014 Microsoft