I believe that if you run a Measure
& pass, passing in an infinite Arrange
Size
, you'll be able to get the DesiredSize
.
var infiniteSize = new Size(double.PositiveInfinity, double.PositiveInfinity);
control.Measure(infiniteSize);
control.Arrange(new Rect(infiniteSize));
correction:
As mentioned in the comments, just calling Measure()
with infinite Size
does the trick; do not use Arrange()
.