FocusControl class
TOC
Collapse the table of content
Expand the table of content

FocusControl class

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

Syntax


var focusControl = VideoDeviceController.focusControl;

Members

The FocusControl class has these types of members:

Methods

The FocusControl class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Configure 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 Asynchronously sets the focus Value.
UnlockAsync Unlocks the capture device's focus if it has previously been locked with a call to LockAsync.

 

Properties

The FocusControl class has these properties.

PropertyAccess typeDescription

FocusChangedSupported

Read-only

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

FocusState

Read-only

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

Max

Read-only

Gets the maximum focus length.

Min

Read-only

Gets the minimum focus length.

Mode

Read-only

Gets the capture device's current focus mode.

Preset

Read-only

Gets the focus preset.

Step

Read-only

Gets the smallest focus increment supported by the capture device.

Supported

Read-only

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

SupportedFocusDistances

Read-only

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

SupportedFocusModes

Read-only

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

SupportedFocusRanges

Read-only

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

SupportedPresets

Read-only

Gets the focus presets that the capture device supports.

Value

Read-only

Gets the current value that the focus is set to.

WaitForFocusSupported

Read-only

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

 

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.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Media.Devices
Windows::Media::Devices [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.Devices
Windows::Media::Devices [C++]

Metadata

Windows.winmd

Attributes

[DualApiPartition()]
[MarshalingBehavior(Standard)]
[Threading(MTA)]
[Version(0x06030000)]

See also

Object
MediaCapture.VideoDeviceController
Manual camera controls for photo and video capture

 

 

Show:
© 2017 Microsoft