I'd like to make 3 rows in a grid in a WPF datatemplate. The first is set to Height=Auto, the second fills the available space and the third is equal to the first. I've tried with binding to elementname, but that doesn't seem to work
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" x:Name="definition" />
<RowDefinition Height="*" />
<RowDefinition Height="{Binding ElementName=definition, Path=ActualHeight}" />
</Grid.RowDefinitions>
<TextBox Grid.Row="0" Height="100" />
</Grid>
In this example I hope the height of the third row is also 100px. Any suggestions?
Best Answer
Try this: