MMC provides structure on the context menus considerably beyond that found in the shell. For any given node in the tree there are three types of actions provided on the context menus:
Actions provided by the console itself; such as changing views, turning on or off the tree view, changing the window state, etc.
Actions provided by the primary Snap-In; these are actions provided by the Snap-In that created the node
Actions provided by extension Snap-Ins; any Snap-In that extends the particular node type is able to place actions on its context menu
In addition to specifying who can place items on the context menus, the console specifies where these items can be placed. The following picture illustrates this:
This picture shows only the "Create New" menu, but the same organization applies to the "Tasks" menu.
There are a few rules for Snap-Ins that extend the context menu:
No Snap-In may add a separator; the separators indicate the different areas for items to be added.
Snap-Ins may add cascading menu items on the Create New and Tasks menus, but not on the first context menu.
Items appear in the order that they are loaded; it is not possible for a Snap-In to push its items to the top of the list, nor for a user to rearrange them.
At this point, the areas of the menu have been defined, but no guidelines have been given as to what goes into those areas. The Create New menu is intended to be filled with any new object or action that can be taken on an object. For instance, if a node in the tree knows how to create a new folder then that would appear in the Create New menu.
The other special section of the context menu is the Tasks menu. The tasks in this menu are in many ways similar to those exposed on the taskpads (described later), but the major difference is that taskpad tasks may not take a particular selection context, whereas context menu tasks can. In the Tasks menu your Snap-In should place any actions which do not create new objects. This should include any wizards, etc. which are appropriate to the currently selected object, even if those wizards actually end up taking the user to a different object.
A couple of the most important actions, and properties, should be placed on the first level of the context menu as well as in the Create New or Tasks submenus. The decision as to which actions to promote to this first level is made by the Snap-In designer. Only the Snap-In which owns the currently selected node may place items on this first level of context menu; extensions to the current Snap-In may not do so.