Here's a really simple example. I've created a grid with two rows.
The first has your expander, and its height is set to Auto
, so it'll only take as much room as it needs.
The second has your border; it's height is *
, so it'll take as much room as it can.
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Expander Content="hi" Header="bye" />
<Border Grid.Row="1" BorderThickness="1" BorderBrush="Black" />
</Grid>
Effect: