<Grid Width="80">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock>123456789</TextBlock>
</Grid>
如上,将Grid划分为两列,当指定Grid宽度时,显示正常,但若不指定宽度,如果第一列的内容太多,就会撑开第一个ColumnDefinition,造成实际上两列并不是均等宽度。
有没有什么办法,既不指定Grid宽度,又能保证其内部布局按照设定好的比例来显示呢?