private async void Deo_DisplayEnhancementOverrideCapabilitiesChanged(DisplayEnhancementOverride sender, DisplayEnhancementOverrideCapabilitiesChangedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { supportedNitRange = args.Capabilities.GetSupportedNitRanges(); brightnessPercentageSupportedStateTextBlock.Text = args.Capabilities.IsBrightnessControlSupported ? "Yes" : "No"; brightnessNitsSupportedStateTextBlock.Text = args.Capabilities.IsBrightnessNitsControlSupported ? "Yes" : "No"; stackPanelComboBoxPercentage.Visibility = args.Capabilities.IsBrightnessControlSupported ? Visibility.Visible : Visibility.Collapsed; textBlockPercentageBrightnessSettings.Visibility = args.Capabilities.IsBrightnessControlSupported ? Visibility.Collapsed : Visibility.Visible; stackPanelComboBoxNits.Visibility = args.Capabilities.IsBrightnessNitsControlSupported ? Visibility.Visible : Visibility.Collapsed; textBlockNitsBrightnessSettings.Visibility = args.Capabilities.IsBrightnessNitsControlSupported ? Visibility.Collapsed: Visibility.Visible; if (supportedNitRange.Count >= 1) { textBlockNitsInputError.Text = "Please enter a number between " + supportedNitRange[0].MinNits + " and " + supportedNitRange[supportedNitRange.Count - 1].MaxNits + "."; nitsBrightnessSlider.Minimum = supportedNitRange[0].MinNits; nitsBrightnessSlider.Maximum = supportedNitRange[supportedNitRange.Count - 1].MaxNits; } else { textBlockNitsInputError.Text = "No nit ranges on nits system!"; } }); }
private async void Deo_DisplayEnhancementOverrideCapabilitiesChanged(DisplayEnhancementOverride sender, DisplayEnhancementOverrideCapabilitiesChangedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { supportedNitRange = args.Capabilities.GetSupportedNitRanges(); brightnessPercentageSupportedStateTextBlock.Text = args.Capabilities.IsBrightnessControlSupported ? "Yes" : "No"; brightnessNitsSupportedStateTextBlock.Text = args.Capabilities.IsBrightnessNitsControlSupported ? "Yes" : "No"; stackPanelComboBoxPercentage.Visibility = args.Capabilities.IsBrightnessControlSupported ? Visibility.Visible : Visibility.Collapsed; textBlockPercentageBrightnessSettings.Visibility = args.Capabilities.IsBrightnessControlSupported ? Visibility.Collapsed : Visibility.Visible; stackPanelNitsBrightness.Visibility = args.Capabilities.IsBrightnessNitsControlSupported ? Visibility.Visible : Visibility.Collapsed; textBlockNitsBrightnessSettings.Visibility = args.Capabilities.IsBrightnessNitsControlSupported ? Visibility.Collapsed: Visibility.Visible; }); }
private void Deo_DisplayEnhancementOverrideCapabilitiesChanged(DisplayEnhancementOverride sender, DisplayEnhancementOverrideCapabilitiesChangedEventArgs args) { Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { BrightnessPercentageSupportedStateTextBlock.Text = args.Capabilities.IsBrightnessControlSupported ? "Yes" : "No"; BrightnessNitsSupportedStateTextBlock.Text = args.Capabilities.IsBrightnessNitsControlSupported ? "Yes" : "No"; }); }