This document is archived and information here might be outdated.  Recommended version.


IMenuDef Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (SystemUI)  

IMenuDef Interface

Provides access to members that define a menu.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

When To Use

The IMenuDef interface is used to define the properties of a custom menu. When creating your own menu, you would implement the IMenuDef interface in your class code. You can set the caption and name of the menu and specify what commanditems are on the menu.

If you want your custom menu to appear in the Menus category in the Customize dialog you also need to implement the IRootLevelMenu interface. IRootLevelMenu is an indicator interface that is used only to indicate to the application that the menu should be treated as a root menu.
If you are creating a context menu you would implement both IMenuDef and IShortcutMenu. IShortcutMenu is an indicator interface that is used only to indicate to the application that this menu should be treated as a context menu.

Members

Description
Read-only property Caption The caption of this menu.
Method GetItemInfo The CLSID for the item on this menu at the specified index.
Read-only property ItemCount The number of items in this menu.
Read-only property Name The name of this menu.

CoClasses that implement IMenuDef

CoClasses and Classes Description
ControlsEditingEditorMenu (esriControls) Provides access to the engine editing menu.
ControlsEditingSketchContextMenu (esriControls) Engine sketch context menu.
ControlsEditingSnapToFeatureMenu (esriControls) Engine editing snap-to-feature context menu.
ControlsEditingVertexContextMenu (esriControls) Engine edit vertex context menu.
ControlsFeatureSelectionMenu (esriControls) A menu with common selection commands.
ControlsMapBookmarkMenu (esriControls) Provides access to the bookmark menu.
ControlsMapViewMenu (esriControls) A menu with common commands that help to view a map.
ControlsNetworkAnalystSolverMenu (esriControls) Engine Network Analyst Solver Menu.
ControlsSnappingMenu (esriControls) Menu of snapping commands that control the snapping environments.
FDLDataSrcMenu (esriDataInteropUI) FDLDataSrcMenu Class
FDLRootMenu (esriDataInteropUI) FDLRootMenu Class
FeatureClassLayerContextMenu (esriTrackingAnalystUI) Object used to extend feature class layer context menu choices.
FeatureServiceEditContextMenu (esriGeoDatabaseDistributedUI) Feature Service Edit Menu.
GxMSDFileContextMenu (esriCatalogUI) Context Menu.
LayerSelectionContextMenu (esriArcMapUI) Layer Selection Context Menu.
MapViewCommandsContextMenu (esriArcMapUI) Map View Commands Context Menu.
TableContextMenuArrange (esriArcMapUI) Arrange table windows context menu.

See Also

IRootLevelMenu Interface | IShortcutMenu Interface