Reputation: 566
I'm trying to find way how to programmatically dim screen in the UWP app, but I can't find any related API... is there anything like that?
Upvotes: 2
Views: 1661
Reputation: 15758
Update:
This is possible since Windows 10 Creators Update, see https://learn.microsoft.com/en-us/uwp/api/windows.graphics.display.brightnessoverride.
Unfortunately, there is no such API that can control the screen brightness in Universal Windows Platform (UWP). As @Rafael said, the screen brightness is thought to be a global setting controlled by the System Settings. And in some device families such as IoT, the device even may has no monitor.
If you want to dim the screen in your app, you can try to add a dark overlay on top of your view and control its opacity. Also, you are welcome to vote on UserVoice to ask for this feature.
Upvotes: 1
Reputation: 815
In newer versions of UWP API this is possible, please see:
UWP > API reference > Windows.Graphics.Display > BrightnessOverride
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Upvotes: 3