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


IMultiItem Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > SystemUI > ESRI.ArcGIS.SystemUI > Interfaces > IM > IMultiItem Interface
ArcGIS Developer Help

IMultiItem Interface

Provides access to members that define a multiItem.

Product Availability

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

Description

A MultiItem can be used when items on a menu can't be determined prior to runtime or the items need to be modified based on the state of the system. A good example of this is the menu items at the bottom of the File menu representing the most recently used files. The IMultiItem interface allows a single object to act like several adjacent menu items. During runtime, the framework will notify MultiItem commands when their host menu is about to be shown. At this point, all the commands implementing IMultiItem can query the system to determine how many items should be represented and how each should appear.

When To Use

If you want to create a custom multiItem, you must implement the IMultiItem interface in your class code. This interface allows you to assign properties such as caption, bitmap, enabled state, and checked state to each item. It also defines what action happens when an item in the multiItem is clicked. You do not implement the ICommand interface when creating a MultiItem.
You may also want to implement the IMultiItemEx interface in order to assign message, helpfile and helpcontextid properties to each item.

You should also create a custom menu with your custom multiItem on it since multiItems can only appear on menus. MultiItems are never added to the commands list in the Customize dialog so you need to use a custom menu to provide access to the multiItem in the application.

Members

Name Description
Read-only property Caption The caption of the multiItem.
Read-only property HelpContextID The help context ID associated with this multiItem.
Read-only property HelpFile The name of the help file associated with this multiItem.
Read-only property ItemBitmap The bitmap for the item at the specified index.
Read-only property ItemCaption The caption of the item at the specified index.
Read-only property ItemChecked Indicates if item at the specified index is checked.
Read-only property ItemEnabled Indicates if the item at the specified index is enabled.
Read-only property Message The status bar message for all items on the multiItem.
Read-only property Name The name of the multiItem.
Method OnItemClick Occurs when the item at the specified index is clicked.
Method OnPopup Occurs when the menu that contains the multiItem is about to be displayed.

Classes that implement IMultiItem

Classes Description
ControlsMapBookmarksMultiItem (esriControls) Current bookmarks of focus map.
MultiItem (esriFramework) MultiItem CoType.
RasterTableShowMultiItem (esriArcMapUI) A coclass shows multi-item menu of a RasterTable.

See Also

IMenuDef Interface