//StackPanel布局 //创建时间:11:33 页面布局:Orientation默认纵向:Vertical水平为:Horizontal <Button> <Button.Content> <StackPanel Orientation="Horizontal"> <Image Source="1.jpg"></Image> <TextBlock VerticalAlignment="Center" Text="确定"></TextBlock> <StackPanel> </Button.Content> </Button>
//Grid布局 <!--定义表格布局的行和列-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<Grid.RowDefinitions>
</Grid>
RowSpan和ColumnSpan用来定义占几列和占几行