HTML and CSS Reference
The Charms bar counts five elements: Search, Share, Settings, Start, and Devices. The first three
are the most interesting from the perspective of contracts. In fact, Search, Share and Settings are
three of the basic contracts that most Windows Store applications should at least seriously consider.
An application that wants to share some of its content with other applications (and in turn with
other users) implements the Share contract. Users of the Windows 8 operating system know that
there's a standard way for them to share any content the current application may have—the Share
button on the Charms bar. By implementing the Share contract, an application can push its selected
content to any of the applications enlisted in the Share section of the Charms bar.
Likewise, an application that allows users to search for some content (such as, a cooking
application that supports searching for a particular recipe) doesn't need to incorporate an ad hoc
user interface for the search bar. Users know that the standard way for them to search for content
is through the Charms bar. So an application that supports the Search contract can have its content
searched every time the user uses the Search panel in the Charms bar.
Finally, the Settings button brings up the settings page of the current application. By implementing
the Settings contract, the application can bring its own menu and set of options in the Settings panel
in much the same way Microsoft Internet Explorer does in the screenshot of Figure 9-2.
FIGURE 9-2 The Settings panel of Internet Explorer.
Search, Share, and Settings are just the principal contracts available in Windows 8. A few other
contracts are available, as you'll see in the rest of the chapter.