SetBrightnessLevel() статический приватный Метод

Change the brightness setting of the display.
static private SetBrightnessLevel ( int brightnessLevel ) : void
brightnessLevel int /// The brightness value to apply. Should /// be between 0 and 100. ///
Результат void
Пример #1
0
        /// <summary>
        /// Change the monitor brightness when the slider value changes.
        /// </summary>
        private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            var newBrightness = (int)e.NewValue;

            // Change the brightness in a background thread to avoid UI blocking
            new Thread((data) =>
            {
                WmiFunctions.SetBrightnessLevel((int)newBrightness);
            }).Start();

            this.percentageLabel.Content = newBrightness.ToString() + "%";
            DrawIcon.updateNotifyIcon(NotifyIcon, newBrightness);
        }