Perform the following steps to create a sample Grid layout to host a few rectangles in each cell:
- Inside Solution Explorer, open your MainWindow.xaml page.
- Create a few rows and columns inside the default Grid panel, as shown in the following code:
<Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions>
- Add six rectangles inside the Grid, and place them properly by using the Grid.Row and Grid.Column attached properties. You can refer to the following sample code:
<Rectangle Width="100" Height="60" Fill="OrangeRed" Grid.Row="0" Grid.Column...