Search code examples
c#windows-phone-8.1windows-store-apps

How to disable focus assist light in MediaCapture?


I am trying to disable the focus assist light and I cannot find a valid method or property in MediaCapture.VideoDeviceController.FocusControl

Windows Phone's camera app allows configuring the focus assist light:

enter image description here


Solution

  • Have a look at the CameraManualControls SDK sample on the Microsoft Windows Universal Samples GitHub repo.

    You'll find the necessary property for setting it under the FlashControl:

    private void FocusLightCheckBox_CheckedChanged(object sender, RoutedEventArgs e)
    {
        var flashControl = _mediaCapture.VideoDeviceController.FlashControl;
    
        flashControl.AssistantLightEnabled = (FocusLightCheckBox.IsChecked == true);
    }