Aloha guys, I am working on a custom control that has a custom panel and I really need alot of help. As example inside the custom panel I have a small and simple MeasureOverride method that passes the size of double.PositiveInfinity to its children MeasureOverride
method. The custom panel should take care of the layout and it should make children bigger or smaller depending on window size.
If you have dealt with controls you should then know how wpf layout system works and that basically every child calls MeasureOverride which calls MeasureOverride of childs children and so on.
Now the problem is that when i resize the window, the custom panel does get receive the flag to do the measure again hence the MeasureOverride does get called again but this time while passing the double.PositiveInfitinty size to its children, the children MeasureOverride doesnt get called at all (but the method should be called according to the defintion of wpf layout system). Why is that so? I always thought when I call the MeasureOverride on a parent that it children will also be forced to do the measure. Obviously I am wrong so could somebody explain me how does a control/child know when to measure again? By the way I am passing the size of double.PositiveInfinity to the children to tell them to take as much space as needed.