I'm working on a complex application, and I'm having an issue with a listbox not being bounded by the window height. Here's a simplified version of what it looks like. How would I get this listbox to correctly be bounded by the window? Right now, the bottom scroll button is off the screen and cannot be seen until the window is big enough to fit the entire listbox. I need to find a solution that makes the listbox always bounded because I have to implement zooming via a ScaleTransform.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid Name="stack">
<Grid.LayoutTransform>
<ScaleTransform
ScaleX="{Binding ElementName=slider, Path=Value}"
ScaleY="{Binding ElementName=slider, Path=Value}" />
</Grid.LayoutTransform>
<WrapPanel HorizontalAlignment="Left">
<Expander IsExpanded="False" Width="300">hey</Expander>
<Expander IsExpanded="True" VerticalAlignment="Stretch" ClipToBounds="True">
<Grid>
<ListBox >
<Button>hey</Button>
<!-- just add a lot more of these to see the problem -->
<Button>hey</Button>
</ListBox>
</Grid>
</Expander>
</WrapPanel>
</Grid>
<Slider Grid.Column="1" Name="slider" Minimum="1" Maximum="4" Value="1" />
</Grid>