Custom panels must call Measure()
on their children, even if they ignore the result. Calling just Arrange()
causes weird behavior: wrap panels don’t wrap, controls get out of bounds, etc. This is probably documented somewhere, but I found it the hard way. This is a little unexpected: if I know exactly how much space I want to give the child, why should I ask it how much it wants? Well, it turns out I must still ask, or else.
Previous Post: If your custom WPF control just would not show up
Next Post: WPF Grid: Showing Tooltip over Empty Space