FocusControl class

Applies to Windows and Windows Phone

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

Syntax


var focusControl = VideoDeviceController.focusControl;

Attributes

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

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-onlyGets a value that specifics if the capture device supports the FocusChanged event.

FocusState

Read-onlyGets a MediaCaptureFocusState value indicating the current focus state of the capture device.

Max

Read-onlyGets the maximum focus length.

Min

Read-onlyGets the minimum focus length.

Mode

Read-onlyGets the capture device's current focus mode.

Preset

Read-onlyGets the focus preset.

Step

Read-onlyGets the smallest focus increment supported by the capture device.

Supported

Read-onlyGets a value that specifies if the capture device supports the focus control.

SupportedFocusDistances

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

SupportedFocusModes

Read-onlyGets a list of values indicating the focus modes that are supported by the capture device.

SupportedFocusRanges

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

SupportedPresets

Read-onlyGets the focus presets that the capture device supports.

Value

Read-onlyGets the current value that the focus is set to.

WaitForFocusSupported

Read-onlyGets a value indicating 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.

Requirements

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

See also

Object
MediaCapture.VideoDeviceController

 

 

Show:
© 2014 Microsoft