CHAPTER 3

Image

Panels

All classes that derive from the Panel abstract base class are referred to as panels. Panels hold other controls and assist in their layout and presentation. Each XAML panel can hold any number of controls in its Children collection. What differentiates the various panels is how it arranges those children.

Canvas, StackPanel, Grid, and VariableSizedWrapGrid all derive directly from Panel as does VirtualizingPanel. OrientedVirtualizingPanel derives from VirtualizingPanel and itself has two derived classes: VirtualizingStackPanel and WrapGrid, as shown in Figure 3-1.

Figure 3-1. Class hierarchy

The most popular panels are ...

Get Windows 8 XAML Primer 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.