❔ Preventing a panel from overflowing + show scrollbar WPF
I have a situation like this
<StackPanel> <Grid> some buttons </Grid> <StackPanel> possibly wrapped in ScrollViewer? variable height content that may not fit </StackPanel></StackPanel>
<StackPanel> <Grid> some buttons </Grid> <StackPanel> possibly wrapped in ScrollViewer? variable height content that may not fit </StackPanel></StackPanel>
The problem is that the bottom panel overflows on the y axis. Solutions online suggest setting it to the width of the container like here https://stackoverflow.com/questions/47333220/wpf-scrollviewer-content-overflowing which I obviously can't do. How do I hide the overflow? I want it to take all available space on the Y axis, but no more than the screen height.