ExposureControl ExposureControl ExposureControl ExposureControl ExposureControl Class

Definition

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

public : sealed class ExposureControl : IExposureControl
struct winrt::Windows::Media::Devices::ExposureControl : IExposureControl
public sealed class ExposureControl : IExposureControl
Public NotInheritable Class ExposureControl Implements IExposureControl
// This class does not provide a public constructor.
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 Auto

Gets a value that indicates if auto exposure is enabled.

public : Platform::Boolean Auto { get; }
bool Auto();
public bool Auto { get; }
Public ReadOnly Property Auto As bool
var bool = exposureControl.auto;
Value
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 Max

Gets the maximum exposure time.

public : TimeSpan Max { get; }
TimeSpan Max();
public TimeSpan Max { get; }
Public ReadOnly Property Max As TimeSpan
var timeSpan = exposureControl.max;
Value
TimeSpan TimeSpan TimeSpan

The maximum exposure time.

Min Min Min Min Min

Gets the minimum exposure time.

public : TimeSpan Min { get; }
TimeSpan Min();
public TimeSpan Min { get; }
Public ReadOnly Property Min As TimeSpan
var timeSpan = exposureControl.min;
Value
TimeSpan TimeSpan TimeSpan

The minimum exposure time.

Step Step Step Step Step

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

public : TimeSpan Step { get; }
TimeSpan Step();
public TimeSpan Step { get; }
Public ReadOnly Property Step As TimeSpan
var timeSpan = exposureControl.step;
Value
TimeSpan TimeSpan TimeSpan

The smallest exposure time increment.

Supported Supported Supported Supported Supported

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

public : Platform::Boolean Supported { get; }
bool Supported();
public bool Supported { get; }
Public ReadOnly Property Supported As bool
var bool = exposureControl.supported;
Value
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 Value

Gets the exposure time.

public : TimeSpan Value { get; }
TimeSpan Value();
public TimeSpan Value { get; }
Public ReadOnly Property Value As TimeSpan
var timeSpan = exposureControl.value;
Value
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) SetAutoAsync(Boolean)

Asynchronously enables or disable auto exposure.

public : IAsyncAction SetAutoAsync(bool value)
IAsyncAction SetAutoAsync(bool value) const;
public IAsyncAction SetAutoAsync(Boolean value)
Public Function SetAutoAsync(value As Boolean) As IAsyncAction
Windows.Media.Devices.ExposureControl.setAutoAsync(value).done( /* Your success and error handlers */ );
Parameters
value
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) SetValueAsync(TimeSpan)

Asynchronously sets the exposure time.

public : IAsyncAction SetValueAsync(TimeSpan shutterDuration)
IAsyncAction SetValueAsync(TimeSpan shutterDuration) const;
public IAsyncAction SetValueAsync(TimeSpan shutterDuration)
Public Function SetValueAsync(shutterDuration As TimeSpan) As IAsyncAction
Windows.Media.Devices.ExposureControl.setValueAsync(shutterDuration).done( /* Your success and error handlers */ );
Parameters
shutterDuration
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