Measure Control with double.PositiveInfinity WPF

放肆的年华 提交于 2019-12-06 09:26:16

Your children won't get measured again because they don't have to: since you keep passing the same size, WPF knows that there is no reason to measure again since the resulting DesiredSize will be the same.

That being said, the Desiredsize updated by Measure is only the size that your child considers the most appropriate. You should take it into account when overriding ArrangeOverride, but you have no obligation to: simply arrange your children the way you like, the fact that MeasureOverride is called or not for your children should be irrelevant.

sacha

Have you tried calling the UIElement.InvalidateMeasure where UIElement is your parent panel?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!