It's difficult to describe my problem in a few words!
This is what I am trying to achieve.
Object #1 normally fills up the width of its parent.
It can be minimised to a fraction of its former width, and when that happens, it is right-aligned in its parent. Object #2 should automatically slide up to fill the gap, and is left-aligned..
I have tried various stackpanels, wrappanels, and dockpanels - but can't figure out the layout issue.
Is there a method to allow this behaviour without lots of ugly maths in code-behind?
Well, I came up with something. Perhaps not the most elegant in the world - but it works for my use-case.