Some time ago I read on a blog that if MeasureOverride returns new Size(0,0) then that FrameworkElement says it want's all the space that it is given. However there's a ...
Problem
When working on a control derived from FrameworkElement and that contained other controls, in the MeasureOverride method I called Measure() on all children and then returned new Size(0,0) - I wanted this control to take ALL the space that it was given.
Now a problem appeared - actually the problem was that the control did not appear :). So I started to trak down the problem ( the control previously returned the MeasureOverride size ) and what I realized was that if the Width and Height were set on the control then the control looked great. But if the control had W and H not set , it didn't appear at all.
To resolv this problem I used another method that would measure the containing elements an then return that size for the MeasureOverride as well as for ArrangeOverride - now all of a sudden the control works as intended. :)
Conclusion
So in conclusion if you're setting Width and Height on your control then it's ok to return new Size() - Canvas does that.
But if instead you want the control to get the Width and Height from it's children , you MUST return the proper Size from MeasureOverride.
Enjoy,