<Window x:Class="WpfApplication3.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="30"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0">祇園精舎の鐘の声</Label>
<Label Grid.Row="1" Grid.Column="1">諸行無常の響きあり</Label>
</Grid>
</Window>
Grid.RowDefinitionsで行の設定。RowDefinitionの数が行数となる。高さなどを指定することが出来る。
Grid.RowDefinitionsで列の設定。
ColumnDefinitionの数が列数となる。幅などを指定することが出来る。
*は可変指定。他の可変行列を考慮した値が自動計算される。
Autoは内容により値が自動計算される。
Grid.Rowで行、Grid.Columnで列を指定して表示させることが出来る。
行列のIndexは0から始まる。
0 件のコメント:
コメントを投稿