Using Flexible Layouts with the WrapPanel

WrapPanel is a flexible container that is ideally suited to the limited display size of the phone because it allows your UI elements to use space more efficiently. The WrapPanel positions child elements sequentially, from left to right or from top to bottom. When elements extend beyond the panel edge, they are positioned in the next row or column. WrapPanel can operate in one of two layout modes. The Orientation property of the WrapPanel determines its layout mode, either Horizontal (the default value) or Vertical. Figure 9.24 portrays how the WrapPanel positions its children when using a horizontal orientation.

FIGURE 9.24 WrapPanel positions child elements sequentially from left to right (as shown), ...

Get Windows® Phone 8 Unleashed 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.