WPF Grid布局控件入门用法
<Grid>
<!--定义两行-->
<Grid.RowDefinitions>
<!--第一行固定高度大小20-->
<RowDefinition x:Name="row1" Height="20"/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<!--定义两列-->
<Grid.ColumnDefinitions>
<!--第一列固定宽度20-->
<ColumnDefinition Width="20"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--定义按钮,布局在第一行第二列-->
<Button Grid.Row="0" Grid.Column="1" Width="50" Height="20" Background="Red"/>
</Grid>