Chapter 9. Creating Menus
In implementing the Ribbon, one of Microsoft's primary goals was to provide a more intuitive user interface and to move away from the old menu-driven paradigm that had historically housed Office's commands. Therefore, it may come as a bit of a surprise to find out that menus are still very much alive and well. In fact, in selected scenarios they actually form the most dynamic of all the controls that the Ribbon has to offer.
dropDown controls you learned about in Chapter 7 can be viewed as menu-type controls, in that they both provide a label next to an empty box; and by clicking that box, the user is provided a list of items to pick from.
This chapter deals with three other menu-type controls: the
splitButton and the
dynamicMenu. Unlike the
dropDown controls, the
splitButton controls provide their menus behind a button-style interface from which the options become available. The
dynamicMenu is similar in purpose to the
menu, but actually creates a full menu on-the-fly.
This chapter provides a detailed discussion of these three controls and includes examples showing how to create and use each one. As you are preparing to work through the examples in this chapter, we encourage you to download the companion files. The source code and files can be found on the book's website at
The menu Element
On the surface, the
menu is very similar in purpose to the
dropDown controls we created in Chapter ...