private async void SetBrightnessScenario(DisplayBrightnessOverrideScenario scenario) { string scenarioText = ""; switch (scenario) { case DisplayBrightnessOverrideScenario.FullBrightness: scenarioText = "Full Brightness"; break; case DisplayBrightnessOverrideScenario.BarcodeReadingBrightness: scenarioText = "Barcode Brightness"; break; case DisplayBrightnessOverrideScenario.IdleBrightness: scenarioText = "Idle Brightness"; break; } await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { brightnessSettingStateTextBlock.Text = scenarioText; }); deo.BrightnessOverrideSettings = BrightnessOverrideSettings.CreateFromDisplayBrightnessOverrideScenario(scenario); CheckOverrideToggleEnableState(); }
private async void SetBrightnessNits(float nits) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { brightnessSettingStateTextBlock.Text = nits + " nits"; }); deo.BrightnessOverrideSettings = BrightnessOverrideSettings.CreateFromNits(nits); CheckOverrideToggleEnableState(); }
private async void SetBrightnessPercentage(double level) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { brightnessSettingStateTextBlock.Text = level + "%"; }); deo.BrightnessOverrideSettings = BrightnessOverrideSettings.CreateFromLevel(level / 100); CheckOverrideToggleEnableState(); }