Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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