If you set the width of the column definition to Auto, the column will be resized for the size of the CheckBox .
However, this can ruin your layout.
An alternative is the CheckBox wrapper in the StackPanel .
<Grid Margin="10,10,10,10" Name="grid1"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <TextBlock Text="Hello"/> <StackPanel Grid.Column="1" Orientation="Horizontal"> <CheckBox Content="Click Me"/> </StackPanel> <Button Grid.Column="2" Content="Press Me"/> </Grid>
As you can see from the first screenshot, the CheckBox bounding box is now next to the label and label, rather than the full column width, as shown in the second.
The correct behavior:

Invalid behavior:

Chrisf
source share