Skip to main content

CameraControl.DeviceInfo Property

Gets or sets information about the video capture device that is currently used by the CameraControl. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v24.1.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public DeviceInfo DeviceInfo { get; set; }

Property Value

Type Description
DevExpress.Xpf.Editors.DeviceInfo

A DeviceInfo object which contains information about the video capture device that is currently used by the control.

Remarks

DeviceInfo objects contain information about specific video capture devices. This information is sufficient for the CameraControl to create CameraDevice objects, which represent existing webcams. The DeviceInfo property stores this information for the currently used device and can be used to change it.

To set which video capture device the control should use, first call the CameraControl.GetAvailableDevices method to get the list of DeviceInfo objects for all available video capture devices. The retrieved DeviceInfo object can then be assigned to the DeviceInfo property. The code below illustrates an example.

DeviceInfo myDeviceInfo = new DeviceInfo();
foreach (DeviceInfo device in Camera1.GetAvaliableDevices())
{
    if (device.Name == "Front Camera") myDeviceInfo = device;
}
Camera1.DeviceInfo = myDeviceInfo;
See Also