3

I'm developing an universal windows app on Windows 10. I need to get System Power States programmatically but I can't find any solutions for that. As it's mentioned in this question there is Microsoft.Win32.SystemEvents.PowerModeChanged but is not available in Windows 10.

Any suggestions are appreciated.

Community
  • 1
  • 1
Choletski
  • 7,074
  • 6
  • 43
  • 64

1 Answers1

0

Look at the PowerManager class in Windows.System.Power. It provides a number of properties and events to detect the status of the device's battery and power supply. According to the documentation, this class is available in UWP as of build 10240.

Devin Goble
  • 2,639
  • 4
  • 30
  • 44