PowerSource Enumeration
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Indicates whether the device is currently running on battery power or is plugged in to an external power supply.
Namespace: Microsoft.Phone.Info
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
Syntax
Public Enumeration PowerSource
public enum PowerSource
<object property="enumerationValue" .../>
Members
Member name | Description | |
---|---|---|
Battery | The device is running on battery power. | |
External | The device is plugged in to an external power source, such as being docked to a computer or connected to a power supply. |
Remarks
In addition to accessing this property directly, you can register for the PowerSourceChanged event handler to be notified when the power source of the device has changed.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1
Platforms
Windows Phone