The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaDeviceControl class

Applies to Windows and Windows Phone

Gets or sets a device setting on a camera.


/* For information about creating or accessing this object, see Remarks. */




The MediaDeviceControl class has these types of members:


The MediaDeviceControl class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

TryGetAuto Indicates whether automatic adjustment of the camera setting is enabled.
TryGetValue Gets the value of the camera setting.
TrySetAuto Enables or disables automatic adjustment of the camera setting.
TrySetValue Sets the camera setting.



The MediaDeviceControl class has these properties.

PropertyAccess typeDescription


Read-onlyGets the capabilities of the camera for this camera setting.



Various properties on the VideoDeviceController object returns instances of the MediaDeviceControl object. Each VideoDeviceController property represents a particular setting on the camera, such as brightness or focus. Use the MediaDeviceControl object to:

  • Get or set the camera setting.
  • Enable automatic adjustment of the setting.
  • Get the range of values that the camera supports for the setting.

Note  : This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).


The following example shows how to get the Brightness on a VideoDeviceController. Note that Brightness is a MediaDeviceController.

// Get the step size, minimum value, and maximum value of the brightness property to set
// values on a slider control.

function setBrtSlider() {
    var videoDev = null;
    var bValue = null;

    var mediaDevice = new Windows.Media.Capture.MediaCapture();
    videoDev = mediaDevice.videoDeviceController;
    if (videoDev.brightness.capabilities.step !== 0)
        bValue = videoDev.brightness.tryGetValue();
        document.getElementById("slBrt").value = bValue.value;
        document.getElementById("slBrt").min = videoDev.brightness.capabilities.min;
        document.getElementById("slBrt").max = videoDev.brightness.capabilities.max;
        document.getElementById("slBrt").step = videoDev.brightness.capabilities.step;


Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]


Windows::Media::Devices [C++]





© 2014 Microsoft