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

RepositoryItemPictureEdit.ShowZoomSubMenu Property

Gets or sets whether the picture editor’s context menu contains zoom-related commands.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v20.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean ShowZoomSubMenu { get; set; }

Property Value

Type Default Description
DefaultBoolean **Default**

A DefaultBoolean value that specifies if the picture editor’s context menu contains zoom-related commands.

Available values:

Name Description
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

Remarks

If the RepositoryItemPictureEdit.ShowMenu option is set to true, the Picture Edit supports a context menu, which optionally may contain zoom-related commands:

PictureEdit_Class.gif

The zoom sub-menu is available in all image size modes (RepositoryItemPictureEdit.SizeMode) in the following cases:

  • the RepositoryItemPictureEdit.ShowZoomSubMenu property is set to Default and the RepositoryItemPictureEdit.ShowScrollBars property is set to true.
  • the RepositoryItemPictureEdit.ShowZoomSubMenu property is set to True.

The appearance of context menus is controlled by a dedicated Menu Manager object. For standalone PictureEdit controls, the Menu Manager is specified by the BaseEdit.MenuManager inherited property.

By default, the Zoom to menu command is not available. To display it, assign a BarManager object to the Picture Editor’s Menu Manager.

To zoom an image in code, use the RepositoryItemPictureEdit.ZoomPercent property.

An end-user can also zoom the image via the mouse and keyboard, provided that the zoom sub-menu is enabled and the RepositoryItemPictureEdit.SizeMode property is set to Clip. The following actions are supported:

Key/Key Combination Action
Add key (on the numeric keypad) Zooms the image in.
Subtract key (on the numeric keypad) Zooms the image out.
Multiply key (on the numeric keypad) Fits the image into the view region.
Divide key (on the numeric keypad) Displays the image in its original size, by setting the ShowZoomSubMenu to 100.
CTRL+MOUSE WHEEL Zooms the image in and out.

The zooming functionality via the menu is available in any image size mode (RepositoryItemPictureEdit.SizeMode). After a user invokes the zooming functionality via the context menu, the RepositoryItemPictureEdit.SizeMode property is automatically set to Clip, so the user is now able to zoom the image via the mouse and keyboard.

Note

Image scrolling and zooming is not supported for Metafile images.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowZoomSubMenu property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also