❔ Preventing a panel from overflowing + show scrollbar WPF
I have a situation like this
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.
Stack Overflow
WPF - ScrollViewer content overflowing
I have a WPF control with this basic structure:
<Grid>
<ScrollViewer x:Name="_Scroll" Grid.Row="4" Grid.RowSpan="20" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="
4 Replies
I think this happens because the outer stack panel grows off the window
Like it just overflows on the y axis. It seems like it stretches up to children size and not the outer container size
Can I do this without a fixed height on the StackPanel? How can it infer the height from the parent?
Setting it like shown in the linked stackoverflow post just collapses it to 0
Even though the vertical stretch is set on the scroll viewer
To be clear, I'm trying to bind the height to the scroll viewer's ActualHeight
anyone???
Stack Overflow
ScrollViewer not scrolling in WPF
I am using a scrollviewer control around my stack panel which contains an ItemsControl. When there are many items in the ItemsControl it is suppose to scroll but for some reason it just cuts of the...
changing it to grid might work
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.