I have a grid that contains 2 child controls. I have a simple stack panel and a ListBox that will reside in the grid:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="5" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListBox Name="lstGroups" Grid.Row="0" />
<StackPanel Grid.Row="2" />
<Grid>
The problem is that my ListBox renders past the viewable screen area that's assigned to the grid. How can I ensure that my ListBox takes up the available space but that it doesn't render past the second row where I need a vertical scrollbar to see everything?