Creating a UniformGrid

The UniformGrid we’ll create in this section is similar to the WPF-specific panel shown in Chapter 6 with the same name. This version, however, is made for Windows Store and universal apps. It defines no dependency properties. (The WPF version of UniformGrid defines two double dependency properties—Rows and Columns—that enable the user to choose the number of rows and columns, and an int FirstColumn property that enables the user to place leading blank cells in the first row. These are omitted here for simplicity.)

Figure 20.1 demonstrates UniformGrid when used with the following four Ellipses:

<Page x:Class="CustomPanels.MainPage"      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" ...

Get XAML 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.