The NetXP Popup Menu

Introduction

This component is designed to replace the Windows Forms context menu and provide a way to display popup menus using the same architecture used by the command bar control. The CommandContextMenu contains a collection of CommandBarItems similar to the CommandBar control. It also uses the same renderer type as the command bar.

Usage

To use the command context menu, you can drag & drop it from the toolbox. Configure it using the property grid, by editing its Items collection as described in the tutorial for command bars. You can preview the menu in design mode by clicking Live Mode link.

To show a context menu, use the Show method. You should specify a control as the parent control for the menu, as well as the point (relative to the parent control) where the menu is to be shown. The Show method is synchronous which means it terminates only after the user has selected an item or dismissed the menu, much like the Windows Forms context menu.

Note: You should not use the command context menu with a system tray icon. This is because the menu was not designed to be used this way. Use a standard Windows Forms menu with tray icons.