NShape Programmer Tasks
Extending Built-In Context Menus

<< Click to Display Table of Contents >>

Navigation:  Programmer Tasks > Customizing Context Menus >

NShape Programmer Tasks
Extending Built-In Context Menus

Previous pageReturn to chapter overviewNext page

Extend Built-In Context Menus with Own Menu Items

All presenter components with built-in context menus have a ContextMenuStrip and a ShowDefaultContextMenu property. This property can be used for extending the built-in context menus with your own context menu items:

1.Set the ShowDefaultContextMenu of the presenter component to true.
2.Create a ContextMenuStrip component by dragging it from the IDE's tool box onto your form.
Note:
ContextMenu's are for backwards compatibility with .NET Framework 1.x only and are therefore not supported by NShape.
3.Create all context menu items that should extend the presenter component (e.g. a Display) as sub items of the ContextMenuStrip created in 1.
4.Assign the ContextMenuStrip created in 1 to the presenter component (e.g. a Display) and your items will show on top of the presenter component's context menu:
Built-in context menu extended with a custom menu item.

Built-in context menu extended with a custom menu item.