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

RepositoryItemPictureEdit.ShowCameraMenuItem Property

Gets or sets whether the context menu contains a command that allows taking a picture from a webcam.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v20.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Behavior")]
[DefaultValue(CameraMenuItemVisibility.Never)]
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 taking 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.

PictureEdit_CameraMenuItem

The ShowCameraMenuItem property specifies whether this menu item is visible. The following modes are provided:

  • 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 RepositoryItemPictureEdit.TakePictureDialogShowing and RepositoryItemPictureEdit.TakePictureDialogClosed events allow you to perform additional actions when the dialog is loaded and closed, respectively.

See Also