THE PANORAMA CONTROL

In addition to the new controls and features in the Silverlight for Windows Phone Toolkit, another important control is available in the standard Windows Phone 7 SDK: Panorama. The Panorama control enables you to create a wide scrolling user interface that's similar to what you would find in the music and video hub on the phone. The Panorama control gives you a unique way to have what looks to the user like a multi-page application but in fact is just one continuous page. Figure 13-9 shows one of the standard Panorama controls in use on a Windows Phone 7 device.

FIGURE 13-9: A Panorama control on a Windows Phone device.

image

To get started using the Panorama control in your own application, you need to add a reference to the Microsoft.Phone.Controls assembly. Next, you need to figure out how to best lay out your application screen. Because the Panorama control works best with groups or categories, you should try to determine what categories are necessary for your app. Once you've determined how best to lay out the categories, you can add a new Panorama control to your XAML page. Don't forget to add a reference to the required namespace at the top of your file. For the Panorama control, you add the following namespace declaration:

xmlsn:controls=“clr-namespace:Microsoft.Phone.Controls;
assembly=Microsoft.Phone.Controls”

Next, you simply add a Panorama control along ...

Get Beginning Windows® Phone 7 Application Development: Building Windows® Phone Applications Using Silverlight® and XNA® 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.