This documentation is archived and is not being maintained.
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)
No code example is currently available or this language may not be supported.
< object property = " enumerationValue " ... />
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.
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.
Windows Phone OS Supported in: 8.1, 8.0, 7.1