I am trying to implement custom panel in WPF and I don't understand what the real effect of return value from ArrangeOverride method is. It seems that it is allways ok to return finalSize (the argument of ArrangeOverride) without changing it.
Is there a situation in which I should return something different than finalSize?
As stated in the online documentation,
ArrangeOverridereturnsSo if (for whatever reason) the actual size required by a Panel's children differs from
finalSizein one or the other dimension, the method may return a different size.It is however safe to always return
finalSize. This would just mean that your Panel has already determined its final size during the measure pass, and did not adjust it during the actual arrangement of its children.