December 2001
Beginner
976 pages
22h 4m
English
Menu items use EventHandler delegates for associating the code that is executed in response to events raised by menu items (just like buttons). One of several constructors provided by the MenuItem class allows you to pass in an EventHandler delegate that is used to handle the Click event generated by the MenuItem. A Click event can be generated on a menu item by pressing the Enter key on the keyboard, pressing the shortcut key associated with the menu item, or clicking the menu item using the mouse.
NOTE
MenuItems that contain MenuItems do not generate a Click event. Only MenuItems that do not contain child MenuItems can generate Click events.
In the following example, the Options menu item will never generate a ...
Read now
Unlock full access