HTML and CSS Reference
Chapter 3: Application Controls
Certain user interface controls are common to all Metro apps, regardless of which language
is used to create them. In this chapter, I show you how to create and configure AppBars and
Flyouts, which are the two most important of these common controls; together they form the
backbone of your interaction with the user. I also show you how to break up your Metro content
and code into pieces to make your app easy to manage and how to bring those pieces together
Chapter 4: Layouts and Tiles
The functionality of a Metro application extends to the Windows 8 Start menu, which offers a
number of ways to present the user with additional information. In this chapter, I show you how
to create and update dynamic Start tiles and how to apply badges to those tiles.
I also show you how to deal with the Metro snapped and lled layouts, which allow a
Windows 8 user to use two Metro apps side by side. You can adapt to these layouts using CSS or
Chapter 5: Life-cycle Events
Windows applies a very specific life-cycle model to Metro apps. In this chapter, I explain how
the model works, show you how to receive and respond to critical life-cycle events, and describe
how to manage the transitions between suspended and running applications. I demonstrate
how to create and manage asynchronous tasks and how to bring them under control when your
application is suspended. Finally, I show you how to support Metro contracts , which allow your
application to seamlessly integrate into the wider Windows 8 experience.
Tell Me More About the Example Metro Application
he example application for this topic is a simple grocery list manager called MetroGrocer . As
an application in its own right, MetroGrocer is pretty dull, but it is a perfect platform to dem-
onstrate the most important Metro features. You can see how the app looks by the end of this
topic in Figure 1-1 .
his is a topic about programming and not design. MetroGrocer is not a pretty applica-
tion, and I don't even implement all of its features. It is a vehicle for demonstrating coding
techniques, pure and simple. You have picked up the wrong topic if you want to learn about
design. If you want to do some heavy-duty Metro programming, then you are in the right
Is here a Lot of Code in his Topic?
Yes. In fact, there is so much code that I couldn't it it all in without some editing. So, when I
file. When I make small changes or want to emphasize a few critical lines of code or markup, I'll
show you a code fragment, like the one in Listing 1-1, which is taken from Chapter 5 .