3. Using the Pivot Control in Blend
Much as you can with the Panorama control, you can use the Pivot control in an existing project or as the basis for a brand-new Windows Phone application. When creating a new project in Blend, you are given the option to create a new pivot application, as shown in Figure 10.
Figure 10. Creating a pivot application
After you create the pivot application, your main application is made up of a single Pivot control (much like the panorama above). The Pivot has PivotItem objects that represent a container for each pane in the Pivot control, as shown in Figure 11.
Figure 11. A pivot application
The user interface of the Pivot control is different from the Panorama control UI in that it is optimized for the screen, and navigating to the different items is accomplished via swipes or via the list of items at the top of the Pivot control. You can think of the Pivot as a view manager or even a tab control. The Pivot control UI consists of multiple parts, as shown in Figure 12.
Figure 12. Pivot Control Parts
The section labeled #1 shows a header for each item of the Pivot control. Each item has a header (usually text) that the user can tap on to make that view the current view. The current view’s header is shown on the left of this section and is typically highlighted (#2). Lastly, the main content of an individual item of the Pivot can contain any user interface that fits with the design (#3). Unlike the Panorama, the only indication that there is more information to view is the list of headers at the top.
Just like the Panorama control, you can edit the Pivot control’s individual items (PivotItems) in Blend by simply selecting the appropriate PivotItem, which makes that item the current container in which you can do your design, as shown in Figure 13.Figure 13. Editing a PivotItem
At this point you can think of each PivotItem as just another container in your design.