Editing Names of Menu Items for Windows Forms
When you use the Menu Designer, menu items are dynamically created, with the Text property being set by you as you create the menu items. The Name property for each item is set dynamically by the designer, conforming to the naming system MenuItemX, where X is a number representing the order in which the menu item was created.
Visual Studio provides a Name Editor within the Menu Designer for quick and easy changing of the Name property of menu items you create.
To edit the names of menu items at design time using the Name Editor
- In the Menu Designer, right-click and choose Edit Names.
The Menu Designer changes to name-editing mode, with a MenuItem Name appearing next to the text specified in the Text property.
- Change the Name property to the desired value.
Note The Name Editor is a mode that is toggled within the Menu Designer. To leave name-editing mode, right-click within the Menu Designer and choose Edit Names again.