ComponentOne Menus and Toolbars for WinForms: Menus and Toolbars Overview > Common Objects Used to Create Menus and Toolbars > C1ContextMenu Control

C1ContextMenu Control

The C1ContextMenu component is a menu (it derives from the C1CommandMenu base class) that can be attached to an arbitrary control as a context menu. To facilitate this, the C1CommandHolder (which always exists on a form using C1 menus) is an IExtenderProvider providing a C1ContextMenu property of the type C1ContextMenu to all controls on the form.

Note that a C1ContextMenu can be used in other menus in exactly the same way as its base class C1CommandMenu. Thus if you want to use the same menu as a submenu in the main menu system and as a context menu, just link C1CommandLink to the same C1ContextMenu in both places.

For more information about using the C1ContextMenu, please see Context Menu Tasks.


Send comments about this topic to ComponentOne.
Copyright © 1987-2008 ComponentOne LLC. All rights reserved.