ExposureControl ExposureControl ExposureControl ExposureControl Class

Definition

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

public sealed class ExposureControlpublic sealed class ExposureControlPublic NotInheritable Class ExposureControlpublic sealed class ExposureControl
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The ExposureControl gives apps additional control over the exposure settings on a device.

To set an exposure value, call SetValueAsync(TimeSpan). To turn auto exposure on, call SetAutoAsync(Boolean).

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

If the device does not support the ExposureControl, you can still use the Exposure property on the VideoCaptureDevice to set the exposure value.

You can access the ExposureControl for the capture device through VideoDeviceController.

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

Properties

Auto Auto Auto Auto

Gets a value that indicates if auto exposure is enabled.

public bool Auto { get; }public bool Auto { get; }Public ReadOnly Property Auto As boolpublic bool Auto { get; }
Value
bool bool bool bool

true if auto exposure is enabled; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Automatic exposure mode is only supported while the preview stream is running. Check to make sure that the preview stream is running before turning on automatic exposure.

Max Max Max Max

Gets the maximum exposure time.

public TimeSpan Max { get; }public TimeSpan Max { get; }Public ReadOnly Property Max As TimeSpanpublic TimeSpan Max { get; }
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The maximum exposure time.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Min Min Min Min

Gets the minimum exposure time.

public TimeSpan Min { get; }public TimeSpan Min { get; }Public ReadOnly Property Min As TimeSpanpublic TimeSpan Min { get; }
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The minimum exposure time.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Step Step Step Step

Gets the smallest exposure time increment supported by the capture device.

public TimeSpan Step { get; }public TimeSpan Step { get; }Public ReadOnly Property Step As TimeSpanpublic TimeSpan Step { get; }
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The smallest exposure time increment.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Supported Supported Supported Supported

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

public bool Supported { get; }public bool Supported { get; }Public ReadOnly Property Supported As boolpublic bool Supported { get; }
Value
bool bool bool bool

true if the exposure control is supported; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

If the device does not support the ExposureControl, you can still use the Exposure property on the VideoDeviceController to set the exposure value.

Value Value Value Value

Gets the exposure time.

public TimeSpan Value { get; }public TimeSpan Value { get; }Public ReadOnly Property Value As TimeSpanpublic TimeSpan Value { get; }
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The exposure time.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

To set an exposure value, call SetValueAsync(TimeSpan) specifying a value between the Min and Max exposure values. To turn auto exposure on, call SetAutoAsync(Boolean).

Methods

SetAutoAsync(Boolean) SetAutoAsync(Boolean) SetAutoAsync(Boolean) SetAutoAsync(Boolean)

Asynchronously enables or disable auto exposure.

public IAsyncAction SetAutoAsync(Boolean value)public IAsyncAction SetAutoAsync(Boolean value)Public Function SetAutoAsync(value As Boolean) As IAsyncActionpublic IAsyncAction SetAutoAsync(Boolean value)
Parameters
value
System.Boolean System.Boolean System.Boolean System.Boolean

Specifies whether or not to enable or disable auto exposure.

Returns

The object that is used to control the asynchronous operation.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Automatic exposure adjustment is only supported while the preview stream is running. Check to make sure that the preview stream is running before turning on automatic exposure mode.

SetValueAsync(TimeSpan) SetValueAsync(TimeSpan) SetValueAsync(TimeSpan) SetValueAsync(TimeSpan)

Asynchronously sets the exposure time.

public IAsyncAction SetValueAsync(TimeSpan shutterDuration)public IAsyncAction SetValueAsync(TimeSpan shutterDuration)Public Function SetValueAsync(shutterDuration As TimeSpan) As IAsyncActionpublic IAsyncAction SetValueAsync(TimeSpan shutterDuration)
Parameters
shutterDuration
TimeSpan TimeSpan TimeSpan TimeSpan

The exposure time to set the Value property to. The minimum and maximum values are specified by Min and Max.

Returns

The object that is used to control the asynchronous operation.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)