Grid is the most versatile panel and probably the one you’ll use most often. (Visual Studio projects use
Grid by default, even when you create a blank project.) It enables you to arrange its children in a multirow and multicolumn fashion, and it provides a number of features to control the rows and columns in interesting ways. Working with
Grid is like working with a table or CSS grid in HTML.
Listing 6.2 uses
Grid to build a user interface somewhat like the Windows 8.x Start screen. It defines a 7x8
Grid and arranges children in many of its cells.
<Grid Background="#1D1D1D"> <!-- Define seven rows: --> <Grid.RowDefinitions> <RowDefinition ...