Not sure which control you use in Cell 3, but most WPF controls automatically stretch to fit inside a Grid cell. The line height of your grid will be set by the height of the controls in cells 1 and 2.
If you use some kind of custom control where the default behavior for the height is different, you can set Height="Auto" .
If this does not work, you can bind the data to get the actual height of the control in cell 1 or 2. Set the Height property of your control in cell 3 to the following:
Height="{Binding ActualHeight, ElementName=MyControlNameFromCell1, Mode=OneWay}"
EDIT
Another way that can be more reliable is to bind data for row height. Therefore, instead of using "Auto" for line height, use the data binding shown above.
source share