Open
Description
Summary
WinUI is adding a simplified syntax to setting column and row definitions on Grid. WPF should add this too.
Current syntax
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="300" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="25" />
<RowDefinition Height= "14" />
<RowDefinition Height="20" />
</Grid.RowDefinitions>
</Grid>
Proposed Syntax
The same functionality as above with the proposed succinct syntax is shown below:
<Grid ColumnDefinitions="1*, 2*, Auto, *, 300" RowDefinitions="1*, Auto, 25, 14, 20"/>
</Grid>
Full spec described here: microsoft/microsoft-ui-xaml#673 (design is currently being finalized)
API Changes
Follow the same specification implemented by WinUI (probably no new APIs, unless it needs a new type-converter)
Intended Use Case
Developer productivity