Programming Windows: Hello, Ribbon and Jump Lists (Premium)

Of the few developer innovations delivered with Windows 7, the new Scenic Ribbon and Jump Lists are arguably the most interesting. So here are some very quick examples of how one might add these constructs to a Windows app using the Windows Presentation Foundation (WPF).
Scenic Ribbon
The Scenic Ribbon had debuted earlier than Windows 7, in the key Office 2007 apps. But a slightly updated version appeared in the refreshed Paint and WordPad apps that arrived with Windows 7.

Less obviously, the Scenic Ribbon---I’ll just use the term “Ribbon” from here on---introduced a new user experience paradigm that replaced the old command-based system exposed by the menus and toolbars of the past. Now, this new intent-based UI would expose features---rather than commands---to the user. And these features were easier to find because none were hidden, and features could dynamically appear as needed based on context. For example, if a user selected an image in a document, a new Picture Format tab could appear with image-related features.

Even the earliest versions of the Ribbon were quite full-featured. Each Ribbon consisted of two or more tabs, each of which contained named and grouped sets of features, which could be exposed by buttons, style galleries, and other controls. There was a circular application “pearl”---as with the Office 2007 apps---or a rectangular application button---as with WordPad---that, when clicked, displayed a menu of choices. And a Quick Access toolbar that contained a customizable set of often-needed command buttons like New, Open, Save, and the like.

For developers, the Ribbon was---and still is---a dense and complex control with many moving parts. One had to specify the contents of the Quick Access toolbar, the application menu, and each Ribbon tab. And each Ribbon tab could consist of groups, each of which could contain any number of buttons and other controls in different types of layouts. All of these items could be tied to a command or event handler. And the resulting XAML---for those using the Windows Presentation Foundation (WPF), the preferred approach---would very quickly grow out of control.

To understand why, let’s look at some XAML code. This won’t be a complete app, not even close, as the ribbon is just too much work. But here I’ll model a small part of the look and feel of the WordPad ribbon, and fill out some of its functionality. It’s not hard to imagine using this interface for a .NETpad-style productivity app, though a Ribbon is overkill for a text editor. Here’s our inspiration.

Note: The icons I use here are from the Visual Studio Image Library. Yes, they are terrible.
Ribbon basics
WPF provides a native Ribbon control, so adding one to an app is as simple as creating a set of <RIBBON> tags in a Windows app’s main window.

And if you run this without doing anything else, you’ll see that a blank Ribbon has been added like any other toolbar to the to...

Gain unlimited access to Premium articles.

With technology shaping our everyday lives, how could we not dig deeper?

Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.

Tagged with

Share post

Please check our Community Guidelines before commenting

Windows Intelligence In Your Inbox

Sign up for our new free newsletter to get three time-saving tips each Friday

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

Thurrott © 2024 Thurrott LLC