RepositoryItemPictureEdit.ShowCameraMenuItem Property
Gets or sets whether the context menu contains a command that allows an end user to take a picture from a webcam.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v24.2.dll
Declaration
[DefaultValue(CameraMenuItemVisibility.Never)]
[DXCategory("Behavior")]
public CameraMenuItemVisibility ShowCameraMenuItem { get; set; }
Property Value
Type | Default | Description |
---|---|---|
DevExpress.XtraEditors.Controls.CameraMenuItemVisibility | Never | A DevExpress.XtraEditors.Controls.CameraMenuItemVisibility enumeration value that specifies whether the context menu contains a command that allows an end user to take a picture from a webcam. |
Remarks
The PictureEdit control can display the Take Image from Camera menu item that allows an end user to take a snapshot from a webcam. See the figure below.
The ShowCameraMenuItem property specifies whether this menu item is visible. The following modes are available:
- Auto — the menu item is automatically visible if a webcam is plugged in; otherwise, the menu item is hidden;
- Never — the default mode. The menu item is never visible;
- Always — the menu item is always visible.
With a click on the menu item, an end-user invokes the Take Picture dialog. When a snapshot is taken, it is displayed in the PictureEdit control. To learn more about the Take Picture dialog, see the corresponding section in the CameraControl topic.
You can invoke the Take Picture dialog from code, using the PictureEdit.ShowTakePictureDialog() method.
The following events allow you to customize the dialog, camera device, resolution and captured image:
- TakePictureDialogShowing - Fires when the Take Picture dialog is about to be displayed. Allows you to customize the dialog, and specify the camera device and resolution.
- TakePictureDialogClosed - Fires when the Take Picture dialog is closed. Allows you to get the dialog result and captured image, and replace this image.