user969153
user969153

Reputation: 566

How to programmatically dim screen in UWP app

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

Answers (2)

Jay Zuo
Jay Zuo

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

Daniel Walter
Daniel Walter

Reputation: 815

In newer versions of UWP API this is possible, please see:
UWP > API reference > Windows.Graphics.Display > BrightnessOverride

Windows 10 requirements:

Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Upvotes: 3

Related Questions