Skip to main content
A newer version of this page is available. .

CameraControl.GetAvailableDevices() Method

Returns the list of the DeviceInfo objects that contain information about video capture devices available on the current client machine.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v19.2.dll

Declaration

public IEnumerable<DeviceInfo> GetAvailableDevices()

Returns

Type Description
IEnumerable<DevExpress.Xpf.Editors.DeviceInfo>

A list of the DeviceInfo objects that contain information about video capture devices that are on the current client machine.

Remarks

A list of the DeviceInfo objects that contain information about video capture devices that are on the current client machine. The GetAvailableDevices method returns a list of the DeviceInfo objects that contain system information about video capture devices available on the current client machine. These objects can be used to change the video capture device currently used by this CameraControl. To do so, assign the required DeviceInfo object to the CameraControl.DeviceInfo property. Based on this info, the control will automatically create a valid CameraDevice object and assign it to the CameraControl.Device property.

The code below illustrates an example.

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