Grid布局示例

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid Margin="10">
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        
        <Label Grid.Row="0" Grid.Column="0">TITLE 1</Label>
        <TextBox Grid.Row="0" Grid.Column="1">input 1</TextBox>
        <Button Grid.Row="0" Grid.Column="2">btn 1</Button>

        <Label Grid.Row="1" Grid.Column="0">TITLE 2</Label>
        <TextBox Grid.Row="1" Grid.Column="1">input 2</TextBox>
        <Button Grid.Row="1" Grid.Column="2">btn 2</Button>

        <Label Grid.Row="2" Grid.Column="0">TITLE 3</Label>
        <TextBox Grid.Row="2" Grid.Column="1">input 3</TextBox>
        <Button Grid.Row="2" Grid.Column="2">btn 3</Button>

    </Grid>
</Window>