BrightnessOverride.SetBrightnessLevel 方法

定义

设置亮度级别和替代选项。 当你的应用准备好更改当前亮度时,请调用 StartOverride

public:
 virtual void SetBrightnessLevel(double brightnessLevel, DisplayBrightnessOverrideOptions options) = SetBrightnessLevel;
void SetBrightnessLevel(double const& brightnessLevel, DisplayBrightnessOverrideOptions const& options);
public void SetBrightnessLevel(double brightnessLevel, DisplayBrightnessOverrideOptions options);
function setBrightnessLevel(brightnessLevel, options)
Public Sub SetBrightnessLevel (brightnessLevel As Double, options As DisplayBrightnessOverrideOptions)

参数

brightnessLevel
Double

double

屏幕亮度。 值应介于 0.0 和 1.0 之间,其中 1.0 表示 100% 的亮度。

options
DisplayBrightnessOverrideOptions

在亮度替代会话期间修改屏幕亮度级别的选项。

示例

// Set display to 80% brightness and, if the device is on low battery during overriding,
// then allow the display to dim. */

bo.SetBrightnessLevel(0.80, DisplayBrightnessOverrideOptions.UseDimmedPolicyWhenBatteryIsLow);

适用于