First, Grid
Grid is a way of organizing controls in tabular form, similar to the GridLayout in Java AWT, but the difference is
You can place multiple controls in each cell of the grid in WPF, but the controls may cascade together
The grid in WPF supports the merging of cells, similar to the rowspan and colspan in table TD in HTML
Rows and columns in grid can customize height and width
There are two ways to do this when setting height and width:
1) height= "60": No "asterisk" indicates a fixed height
2) height= "60*": Plus "asterisk" to indicate "weighted" height, when resizing the form, this height or width will be scaled to the size of the form change
Such as:
1: <Grid>
2: <Grid.RowDefinitions>
3: <RowDefinition Height="60" />
4: <RowDefinition Height="202*" />
5: </Grid.RowDefinitions>
6: <Grid.ColumnDefinitions>
7: <ColumnDefinition/>
8: <ColumnDefinition/>
9: </Grid.ColumnDefinitions>
10: <Button Grid.Column="0" Grid.Row="0" Height="30" VerticalAlignment="Top">ButtonA</Button>
11: <Button Grid.Column="0" Grid.Row="0" Height="30" VerticalAlignment="Bottom">ButtonB</Button>
12: <Button Grid.Column="1" Grid.Row="0">ButtonC</Button>
13: <Button Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2">ButtonD</Button>
14: </Grid>
Second, the use of gridsplit segmentation
You can use the Gridsplit control to implement functionality similar to the SplitContainer in a Windows application, combined with a grid control, such as the following application: