Auto indicates that you can automatically adapt to the width of the displayed content. For example, you can automatically adapt to the width of the text.
* The width is allocated proportionally.
<ColumnDefinition Width="3*" /><ColumnDefinition Width="7*" />
Same, the rows can be defined in this way
<RowDefinition Height="3*" /><RowDefinition Height="7*" />
These numbers can be decimal.
If the number is default, the default value is 1.
In this example, column 2 is 1.5 times the width of column 1.
<ColumnDefinition Width="1.5*" /><ColumnDefinition />
Auto and * can be used together. In this example, the width of the last two rows is obtained proportionally after the first two rows are allocated.
<Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <!-- Auto-fit to content, ‘Hi‘ --> <ColumnDefinition Width="50.5" /> <!-- Fixed width: 50.5 device units) --> <ColumnDefinition Width="69*" /> <!-- Take 69% of remainder --> <ColumnDefinition Width="31*"/> <!-- Take 31% of remainder --></Grid.ColumnDefinitions><TextBlock Text="Hi" Grid.Column="0" />
Difference between auto and * in WPF