This PR should fix almost all the problems:
The remaining problem is when using adaptWidthToChildren / adaptHeightToChildren with a StackPanel
. However, in my understanding, you should not use these properties as the StackPanel
already adapts its height (if vertical = true) or its width (if vertical = false) to its children.