Using the Menu Control

The WinJS Menu control is derived from the Flyout control—so it has a lot of features in common. Like the Flyout control, the Menu control appears in a popup and the menu disappears automatically when you click outside of the menu area.

However, unlike the Flyout control, the Menu control is specifically designed to display menu commands. You can place only menu commands in a Menu control and not other types of controls or HTML elements. The Menu control supports the following types of menu commands:

Image button—You click the menu item to do something.

toggle—You toggle the menu item.

flyout—Clicking the menu item displays ...

Get Windows® 8.1 Apps with HTML5 and JavaScript Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.