ExposureControl ExposureControl ExposureControl ExposureControl Class

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

Syntax

Declaration

public sealed class ExposureControlpublic sealed class ExposureControlPublic NotInheritable Class ExposureControlpublic sealed class ExposureControl

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 summary

Gets a value that indicates if auto exposure is enabled.

Gets the maximum exposure time.

Gets the minimum exposure time.

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

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

Gets the exposure time.

Methods summary

Asynchronously enables or disable auto exposure.

Asynchronously sets the exposure time.

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; }

    Property Value

    • bool
      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 TimeSpanpublic TimeSpan Max { get; }

    Property Value

  • 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; }

    Property Value

  • 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; }

    Property Value

  • 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; }

    Property Value

    • bool
      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 TimeSpanpublic TimeSpan Value { get; }

    Property Value

    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

    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

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Media.Devices.dll