简体   繁体   中英

How to programmatically dim screen in UWP app

我试图找到如何在 UWP 应用程序中以编程方式使屏幕变暗的方法,但我找不到任何相关的 API……有没有类似的东西?

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)

Update:

This is possible since Windows 10 Creators Update , see https://docs.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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM