wpf-devexpress-dot-xpf-dot-editors-dot-cameracontrol-106d87fd.md
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.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public DeviceInfo DeviceInfo { get; set; }
Public Property DeviceInfo As DeviceInfo
| Type | Description |
|---|---|
| DevExpress.Xpf.Editors.DeviceInfo |
A DeviceInfo object which contains information about the video capture device that is currently used by the control.
|
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;
Dim myDeviceInfo As New DeviceInfo()
For Each device As DeviceInfo In Camera1.GetAvaliableDevices()
If device.Name = "Front Camera" Then
myDeviceInfo = device
End If
Next device
Camera1.DeviceInfo = myDeviceInfo
See Also