FocusControl FocusControl FocusControl FocusControl FocusControl Class

Definition

Provides functionality for controlling the focus settings on a capture device.

public : sealed class FocusControl : IFocusControl, IFocusControl2
struct winrt::Windows::Media::Devices::FocusControl : IFocusControl, IFocusControl2
public sealed class FocusControl : IFocusControl, IFocusControl2
Public NotInheritable Class FocusControl Implements IFocusControl, IFocusControl2
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

You can find out if a device supports this control by checking FocusControl.Supported.

If the device does not support the FocusControl, you can still use the Focus property on the VideoCaptureDevice to set the focus value.

You can access the FocusControl for the capture device through MediaCapture.VideoDeviceController.

The FocusControl gives apps additional control over the focus settings on a device.

You can use one of the FocusPreset values by calling SetPresetAsync. Or call SetValueAsync to set a specific Value between the Min and Max.

For how-to guidance for using the FocusControl, see Manual camera controls for photo and video capture.

Properties

FocusChangedSupported FocusChangedSupported FocusChangedSupported FocusChangedSupported FocusChangedSupported

Gets a value that specifics if the capture device supports the FocusChanged event.

FocusState FocusState FocusState FocusState FocusState

Gets a MediaCaptureFocusState value indicating the current focus state of the capture device.

Max Max Max Max Max

Gets the maximum focus length.

Min Min Min Min Min

Gets the minimum focus length.

Mode Mode Mode Mode Mode

Gets the capture device's current focus mode.

Preset Preset Preset Preset Preset

Gets the focus preset.

Step Step Step Step Step

Gets the smallest focus increment supported by the capture device.

Supported Supported Supported Supported Supported

Gets a value that specifies if the capture device supports the focus control.

SupportedFocusDistances SupportedFocusDistances SupportedFocusDistances SupportedFocusDistances SupportedFocusDistances

Gets a list of values indicating the manual focus distances that are supported by the capture device.

SupportedFocusModes SupportedFocusModes SupportedFocusModes SupportedFocusModes SupportedFocusModes

Gets a list of values indicating the focus modes that are supported by the capture device.

SupportedFocusRanges SupportedFocusRanges SupportedFocusRanges SupportedFocusRanges SupportedFocusRanges

Gets a list of values indicating the auto focus ranges that are supported by the capture device.

SupportedPresets SupportedPresets SupportedPresets SupportedPresets SupportedPresets

Gets the focus presets that the capture device supports.

Value Value Value Value Value

Gets the current value that the focus is set to.

WaitForFocusSupported WaitForFocusSupported WaitForFocusSupported WaitForFocusSupported WaitForFocusSupported

Gets a value that indicates whether WaitForFocus is supported by the capture device.

Methods

Configure(FocusSettings) Configure(FocusSettings) Configure(FocusSettings) Configure(FocusSettings) Configure(FocusSettings)

Configures the FocusControl object with values specified in the provided FocusSettings object.

FocusAsync() FocusAsync() FocusAsync() FocusAsync() FocusAsync()

Asynchronously focuses the device.

LockAsync() LockAsync() LockAsync() LockAsync() LockAsync()

Locks the capture device's focus.

SetPresetAsync(FocusPreset) SetPresetAsync(FocusPreset) SetPresetAsync(FocusPreset) SetPresetAsync(FocusPreset) SetPresetAsync(FocusPreset)

Asynchronously sets the focus Preset.

SetPresetAsync(FocusPreset, Boolean) SetPresetAsync(FocusPreset, Boolean) SetPresetAsync(FocusPreset, Boolean) SetPresetAsync(FocusPreset, Boolean) SetPresetAsync(FocusPreset, Boolean)

Asynchronously sets the focus Preset, specifying if the operation must complete before the device is focused.

SetValueAsync(UInt32) SetValueAsync(UInt32) SetValueAsync(UInt32) SetValueAsync(UInt32) SetValueAsync(UInt32)

Asynchronously sets the focus Value.

UnlockAsync() UnlockAsync() UnlockAsync() UnlockAsync() UnlockAsync()

Unlocks the capture device's focus if it has previously been locked with a call to LockAsync.

See Also