共用方式為


BrightnessOverride.SetBrightnessScenario 方法

定義

藉由指定具有已知亮度等級的案例,以及亮度覆寫的覆寫選項,來設定亮度等級。

public:
 virtual void SetBrightnessScenario(DisplayBrightnessScenario scenario, DisplayBrightnessOverrideOptions options) = SetBrightnessScenario;
void SetBrightnessScenario(DisplayBrightnessScenario const& scenario, DisplayBrightnessOverrideOptions const& options);
public void SetBrightnessScenario(DisplayBrightnessScenario scenario, DisplayBrightnessOverrideOptions options);
function setBrightnessScenario(scenario, options)
Public Sub SetBrightnessScenario (scenario As DisplayBrightnessScenario, options As DisplayBrightnessOverrideOptions)

參數

scenario
DisplayBrightnessScenario

具有已知亮度等級的案例。

options
DisplayBrightnessOverrideOptions

在亮度覆寫會話期間修改螢幕亮度等級的選項。

範例

/* Set the display brightness to a level that is optimum for reading barcodes. If the device is on low battery during overriding, allow the display to dim*/

bo.SetBrightnessScenario(DisplayBrightnessScenario.BarcodeReadingBrightness, DisplayBrightnessOverrideOptions.UseDimmedPolicyWhenBatteryIsLow); 

適用於