Наследование: IMediaDeviceControl
 private void InitializeVideoParamterControl(MediaDeviceControl videoDeviceControl, Slider slider)
 {
     if (videoDeviceControl != null && (videoDeviceControl.Capabilities).Supported)
     {
         slider.IsEnabled = true;
         slider.Maximum = videoDeviceControl.Capabilities.Max;
         slider.Minimum = videoDeviceControl.Capabilities.Min;
         slider.StepFrequency = videoDeviceControl.Capabilities.Step;
         double currentValue;
         if (videoDeviceControl.TryGetValue(out currentValue))
         {
             slider.Value = currentValue;
         }
     }
     else
     {
         slider.IsEnabled = false;
     }
 }
Пример #2
0
 private void SetDefaults(MediaDeviceControl control, bool useAuto = false)
 {
     if (control.Capabilities.Supported)
     {
         if (useAuto)
         {
             control.TrySetAuto(useAuto);
         }
         else
         {
             control.TrySetAuto(useAuto);
             control.TrySetValue(control.Capabilities.Default);
         }
     }
 }