Esempio n. 1
0
        /// <summary>
        /// Sets the brightness level within a range of 0 to 1 and the override options.
        /// When your app is ready to change the current brightness with what you want to override it with, call StartOverride().
        /// </summary>
        /// <param name="brightnessLevel"> double 0 to 1  </param>
        /// <param name="options"></param>
        public void SetBrightnessLevel(double brightnessLevel, DisplayBrightnessOverrideOptions options)
        {
            if (_targetBrightnessLevel != brightnessLevel)
            {
                _defaultBrightnessLevel = LayoutParameters.ScreenBrightness;

                _targetBrightnessLevel = brightnessLevel.Clamp(0, 1);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Sets the brightness level within a range of 0 to 1 and the override options.
 /// When your app is ready to change the current brightness with what you want to override it with, call StartOverride().
 /// </summary>
 /// <param name="brightnessLevel">double 0 to 1 </param>
 /// <param name="options"></param>
 public void SetBrightnessLevel(double brightnessLevel, DisplayBrightnessOverrideOptions options)
 {
     _targetBrightnessLevel = brightnessLevel.Clamp(0, 1);
 }
Esempio n. 3
0
 /// <summary>
 /// Sets the brightness level within a range of 0 to 1 and the override options.
 /// When your app is ready to change the current brightness with what you want to override it with, call StartOverride().
 /// </summary>
 /// <param name="brightnessLevel">double 0 to 1 </param>
 /// <param name="options"></param>
 public void SetBrightnessLevel(double brightnessLevel, DisplayBrightnessOverrideOptions options)
 {
     throw new NotSupportedException();
 }