wpf 布局要点备忘
作者:互联网
通用:
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>
标签:控件,填满,Stretch,100%,水平,备忘,要点,wpf,默认值 来源: https://www.cnblogs.com/nanfei/p/16400269.html