Using Menus
An essential component of the Windows user interface is the use of menus. Menus that are typically located in the top of the application window allow a context-sensitive user interaction mechanism for a broader functionality. Menus are typically hierarchical, and the menu hierarchies provide the user a large number of possible actions in a very compact user interface. Adding a menu to Windows Forms is as simple as setting the Menu property to a MainMenu object (Listing 7.7, Figure 7.11). The MainMenu instance itself can contain a hierarchy of MenuItem instances. MenuItem can have a set of event handlers assigned to provide the required user interaction. Also note that menu items that contain the ampersand (&) character also have an ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access