Unfortunately, there is no property for this function.
The only workaround I know is to either use an existing control, or place another hidden control in the same space, and then bind the Width your TextBlock/TextBox to the ActualWidth that control.
Here is an example where TextBlock does not affect Width for ColumnDefinition , but it will expand if ColumnDefinition is resized for another reason
<Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <TextBlock Grid.Column="1" TextWrapping="Wrap" Text="{Binding ...}" Width="{Binding ElementName=sizingControl, Path=ActualWidth}"/> <Rectangle Name="sizingControl" Grid.Column="1" Visibility="Hidden" /> </Grid>
source share