34,333
edits
Changes
→Deleting and Moving Menu Items
== Deleting and Moving Menu Items ==
To delete a menu item in Visual Studio, simply right click on the item and select ''Delete'' from the popup menu. To move an item within the same menu, click and drag the item to the new position by holding down the mouse button. Release the button when the mouse pointer reaches the new location. To move an item from one menu to another, first right click over the menu item, select ''Cut'' from the popup menu. Next, click on the new menu to which you wish to move the item and, with the mouse position on the menu item you wish to appear ''below'' the new item, right click and select ''Paste''.
== Assigning Keyboard Shortcuts to Menu Items ==
It is conventional to allow menu items to be selected using the keyboard using what are know as ''keyboard shortcuts''. These are key sequences that typically involve pressing a key whilst holding down the ''Ctrl'', ''Alt'' or ''Shift'' key.
Keyboard shortcuts are defined by setting the ''ShortcutKeys'' property of a menu item object. For example, to configure the Exit menu item to use ''Ctrl-X'' select the menu item and click in the value field of the ''ShortcutKeys'' property in the Visual Studio Properties panel. A panel will appear providing the option to select ''Ctrl'', ''Shift'' or ''Alt'' and also the key to be pressed in conjunction. Use this panel to configure the ''Ctrl+X'' key sequence for this menu item.