とりあえず、例題作ってレイアウトしてみたわ。理屈よりまず実践よね。
widthやheightが「*」になっているところは自動的に可変になるの。ボタンなんかは固定だから、ちゃんと数字を書いてあるわけね。
#ref(): File not found: "wpf1.jpg" at page "wpf、ウインドウ基本レイアウト"
<Window x:Class="wtest1.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> <Grid.RowDefinitions> <RowDefinition Height="25" /> <RowDefinition Height="25" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid Grid.Row="0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="80" /> <ColumnDefinition Width="40" /> </Grid.ColumnDefinitions> <TextBox Grid.Column="0" Name="textBox1" /> <Button Grid.Column="1" Name="Button1" Content="アクセス" /> <Button Grid.Column="2" Name="Button11" Content="RSET" Background="Purple" Foreground="White" /> </Grid> <Grid Grid.Row="1"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Button Grid.Column="0" Name="Button2" Content="前へ" /> <Button Grid.Column="1" Name="Button3" Content="再生" Foreground="Yellow" Background="Plum" /> <Button Grid.Column="2" Name="Button4" Content="次へ" /> </Grid> <TextBox Grid.Row="2" Name="textBox3" /> </Grid> </Window>