通用:
VerticalContentAlignment="Stretch" :内部子控件会垂直100%高度
HorizontalContentAlignment="Stretch" :内部子控件会水平100%宽度
HorizontalAlignment="Left" :设置之后会左对齐,水平方向不会自动填满,默认值为Stretch,水平方向会填满父控件
VerticalAlignment="Bottom" :同上
Grid:
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="限报性别" HorizontalAlignment="Left" Padding="10"></TextBlock>
<TextBlock Grid.Column="1" Text="{Binding Path=limitGender}" HorizontalAlignment="Right" Padding="10"></TextBlock>
</Grid>