When I create a grid using both a SharedSizeGroup on columns and a column spanning control, the grid goes ‘mental’ jerking around and maxing out a cpu core.
I’m sure there must be a good reason why this doesn’t work but I can’t think of it! How else can I achieve this sizing layout?
<Grid IsSharedSizeScope="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="Columns"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="Columns"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Column="0">Blah</Label>
<Label Grid.Column="1">Blah Blah Blah Blah</Label>
<Label Grid.Row="1" Grid.ColumnSpan="2">ajsgdeererajgsfdg dfg df gdfg djgsad</Label>
</Grid>
What you’ve done is essentially set up infinite recursion in your layout.
larger one (probably Column 1 here).
Column 1’s size, the third label can
now use more of the space in Column
needs in Column 1 becomes smaller,
allowing Column 1 to scale down to
match the new space required by its
contents.
SharedSizeGroup is intended to be used across different Grids to maintain alignment of elements that are somehow separated into different containers, like different templated list items or a header row. If you need an equally split row that isn’t stretched you could use something else like * sized columns or a UniformGrid instead.