I have an WPF usercontrol which contains following grid.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0"
Width="24"
Height="24"
Margin="8"
Visibility="{Binding Path=IsVisible, Converter={StaticResource InvertBoolToVisibility}}"
Source="{Binding Path=MyIcon}"/>
<Label Grid.Column="1"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Stretch"
HorizontalAlignment="Stretch"
Height="Auto"
Margin="5"
Foreground="{Binding Path=ForegroundColor}">
<TextBlock Text="{Binding Path=Text}" TextWrapping="Wrap"/>
</Label>
<Button Grid.Column="2"
Width="80"
Height="28"
VerticalAlignment="Center"
HorizontalAlignment="Left"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"
Margin="5,5,30,5"
Padding="5"
Content="Remove All"
Foreground="Red"
Visibility="{Binding Path=IsVisible, Converter={StaticResource BoolToVisibility}}"
Click="RemoveAll_Click"/>
<Image Grid.Column="3"
Width="36"
Height="36"
Margin="8,2"
Visibility="{Binding Path=IsVisible, Converter={StaticResource InvertBoolToVisibility}}"
Source="{Binding Path=MyLogo}" />
</Grid>
The problem with above grid is that button is not placed just after the Label content, instead when label content is short there is a huge space between the label content and the button.
I would like to put the button just after the label content, I don't want any space between label and button. How can I do this?
See below screenshot to see what's happening (each time I resize the window to right, there is more space between label and button):
I need the button to always keep on the right of the label (this is already working),

I would usually use a StackPanel when I want things directly after one another. I.e. put a stackpanel into the grid, and put both the label and the button into the stackpanel. Don't forget to set the orientation of the stackpanel. This assumes you do not want the button to align with anything else.
Another approach would be to use another column for filling any remaining space. Currently your column 1 is set to size " * ", i.e. fill any remaining space. If you change it to auto and move the " * " to some other column, possibly a empty column, you should remove the space between the button and label.