My question here is more of a theoretical one rather than functional. So what I'm looking for is an answer that can maybe be backed up with some documentation.
I find myself in the situation where I need to do some custom measurements/arrangements for a wpf control's children?
- Is it ok to measure the children based on other size constraints rather than the one received as a parameter.
Some pseudocode of what I'm trying to achieve:
MeasureOverride(size) { foreach(child in children) { if(condition) { child.measure(size) } else { child.measure(customSize) if(...) { ... } ... } } }
Should all the logic for this live inside MeasureOverride or should I just call measure with the size received as a parameter on all children and then do the logic inside ArrangeOverride? Thanks!