Fill with Measure/ArrangeOverride inside a scrollviewer

838 Views Asked by At

I have a custom drawn control containing some plots. I've put it inside a scrollviewer since later I want to be able to zoom the control's contents. I want this control to have a specific minimum height and if the available visible space is bigger than that it should fill the space. However using MeasureOverride I just get infinity for the available height (because of the scrollviewer). How can I get the actual available visible space during MeasureOverride to stretch my control to this height?

1

There are 1 best solutions below

4
On

You should not need to do any layout overriding for that, just set the alignments to Stretch and a MinHeight.