ExposureControl ExposureControl ExposureControl ExposureControl Class

Definition

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

public : sealed class ExposureControl : IExposureControlpublic sealed class ExposureControl : IExposureControlPublic NotInheritable Class ExposureControl Implements IExposureControl// You can use this class in JavaScript.
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. To turn auto exposure on, call SetAutoAsync.

You can find out if a device supports this control by checking ExposureControl.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 MediaCapture.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 : PlatForm::Boolean Auto { get; }public bool Auto { get; }Public ReadOnly Property Auto As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

true if auto exposure is enabled; otherwise, false.

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 TimeSpan// You can use this property in JavaScript.
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The maximum exposure time.

Min Min Min Min

Gets the minimum exposure time.

public : TimeSpan Min { get; }public TimeSpan Min { get; }Public ReadOnly Property Min As TimeSpan// You can use this property in JavaScript.
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The minimum exposure time.

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 TimeSpan// You can use this property in JavaScript.
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The smallest exposure time increment.

Supported Supported Supported Supported

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

public : PlatForm::Boolean Supported { get; }public bool Supported { get; }Public ReadOnly Property Supported As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

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

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 TimeSpan// You can use this property in JavaScript.
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The exposure time.

Remarks

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

Methods

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

Asynchronously enables or disable auto exposure.

public : IAsyncAction SetAutoAsync(bool value)public IAsyncAction SetAutoAsync(Boolean value)Public Function SetAutoAsync(value As Boolean) As IAsyncAction// You can use this method in JavaScript.
Parameters
value
bool Boolean Boolean Boolean

Specifies whether or not to enable or disable auto exposure.

Returns

The object that is used to control the asynchronous operation.

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 IAsyncAction// You can use this method in JavaScript.
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.

See Also

See Also