I have a stack panel inside of an expander panel that I programaticaly adds check boxes to. Currently the exanpander stops at the bottom of the form, but the stack panel keeps growing. I would like the stack panel to be bounded by the expander and scroll to display the check boxes. Do I need house the check boxes in a list box to get the scroll functionality?
<Grid>
<Expander Header="Expander1" Margin="0,0,0,2" Name="Expander1" VerticalAlignment="Top" Background="Coral">
<StackPanel Name="StackScroll" Margin="0,0,0,2" Background="Aqua"></StackPanel>
</Expander>
</Grid>
");
You can nest the StackPanel in a ScrollViewer:
<Grid>
<Expander Header="Expander1" Margin="0,0,0,2" Name="Expander1" VerticalAlignment="Top" Background="Coral">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Name="StackScroll" Margin="0,0,0,2" Background="Aqua">
</StackPanel>
</ScrollViewer>
</Expander>
</Grid>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With