Chen Kinnrot
Chen Kinnrot

Reputation: 21015

Grid column autocollapse

Is it possible for a grid column to collapse itself according to his child width? and the column next to him to expend and take the extra space he got ?

If not, whats the best way to achieve this ability?

Upvotes: 1

Views: 220

Answers (1)

HCL
HCL

Reputation: 36775

Set the widht of the first GridColumnDefinition to Auto and the second one to *

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>        

</Grid>

Upvotes: 2

Related Questions