[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Collapse]Editors and Simple Controls
    Templated ListBox Items
   [Expand]Simple Editors
   [Expand]Lookup Editors
   [Expand]Token Edit Control
   [Expand]Breadcrumb Edit Control
   [Expand]Range Control
   [Expand]Image Slider
    Camera Control
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Camera Control

The CameraControl displays a video stream from a video capture device (a webcam) and allows you to save snapshots.

Expanded Select a Capture Device

The Camera Control automatically detects video recording devices and starts streaming data. To disable this feature, disable the CameraControl.AutoStartDefaultDevice property.

The Camera Control creates a CameraDevice object for each recording device. The active webcam's CameraDevice object is assigned to the CameraControl.Device property. To manually change the active camera, do the following:

The example below illustrates how to switch to the first available Logitech webcam manually.

Note

A Camera Control cannot receive data from a webcam which is already streaming to another control or "Take Picture" dialog.

Expanded Settings Dialog

If the CameraControl.ShowSettingsButton property is enabled, the Camera Control shows a Settings button when a user hovers the mouse pointer over the client area.

Clicking this button invokes the Camera Settings dialog that allows you to choose the active camera and adjust video settings.

To invoke this dialog from code, call the CameraControl.ShowSettingsForm method. You can also access the current webcam's video quality settings through the CameraControl.VideoSettings property.

Important

  • Video settings are stored in the recording device. Changing these settings in the Camera Control's Settings dialog can affect the quality of videos captured in other applications.
  • The type of webcam determines the video quality settings (and their maximum\minimum values) available in the Settings Dialog.

Expanded Operate the Video Stream and Take Snapshots

  • CameraControl.Start - starts transmitting video data from the selected webcam.
  • CameraControl.Stop - terminates streaming. A Camera Control that streams nothing displays the following message:

  • CameraControl.TakeSnapshot - saves the displayed frame as a 32-bit Bitmap object. Call the Bitmap.Save() method to save this bitmap to a local storage or stream.

Expanded "Take Picture" Dialog

If you need the Camera Control to take pictures, use the Take Picture Dialog instead. This is a modal dialog with an embedded Camera Control and the "Capture"\"Save"\"Cancel" buttons.

To invoke this dialog from code, create a new DevExpress.XtraEditors.Camera.TakePictureDialog class instance and call its ShowDialog method. The dialog returns the captured bitmap when a user clicks "Save".

Is this topic helpful?​​​​​​​