FocusControl Class

Definition

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

public ref class FocusControl sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=100859904)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class FocusControl sealed
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=100859904)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public sealed class FocusControl
Public NotInheritable Class FocusControl
Inheritance
FocusControl
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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

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

FocusState

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

Max

Gets the maximum focus length.

Min

Gets the minimum focus length.

Mode

Gets the capture device's current focus mode.

Preset

Gets the focus preset.

Step

Gets the smallest focus increment supported by the capture device.

Supported

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

SupportedFocusDistances

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

SupportedFocusModes

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

SupportedFocusRanges

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

SupportedPresets

Gets the focus presets that the capture device supports.

Value

Gets the current value that the focus is set to.

WaitForFocusSupported

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

Methods

Configure(FocusSettings)

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

FocusAsync()

Asynchronously focuses the device.

LockAsync()

Locks the capture device's focus.

SetPresetAsync(FocusPreset)

Asynchronously sets the focus Preset.

SetPresetAsync(FocusPreset, Boolean)

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

SetValueAsync(UInt32)

Asynchronously sets the focus Value.

UnlockAsync()

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

Applies to

See also