Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include Adorner in ScrollViewer scrollable region

I currently have an Adorner inside a ScrollViewer. Objects at the bottom of the scrollviewer can sometimes display a large adorner below them. Unfortunately, that adorner is not included in the ExtentHeight of the scrollviewer, so the lower portion of the adorner is clipped by the bottom of the scrollviewer's viewport.

Is there a way to get the adorner layer's contents to be included in the scrollable region of the scrollviewer?

like image 240
Ryan Norbauer Avatar asked Mar 20 '26 17:03

Ryan Norbauer


1 Answers

I'm afraid the consensus from other sources and hours of investigation seems to be that what I mentioned simply isn't possible. My solution has been simply to detect the last item in my ListBox and automatically add a margin to its bottom when my Adorner is being displayed. It's a bit of a hack, but it achieves the desired behavior mentioned above.

like image 144
Ryan Norbauer Avatar answered Mar 22 '26 19:03

Ryan Norbauer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!