ArrangeOverride and Arrange() when are they called by the Layouting system?
I am trying to understand the layout system in Silverlight, but I don't really know how the process works. I know that Measure is always called before and then when all the measures have been done the arrange
starts. But when exactly does this process start, and are we able to control it?
Please don't write MSDN library link, I have already read it, and it's not clear at all.
My specific situation is that I have some nested LinearLayouts
(inherit a class from Panel
and Arrangeoverride
and MEasureoverride
work) but I need the rootcontainer
size (because their sizes are percentages of the parent), and I can't get it until all the elements are loaded in the tree, so I call arrange()
in LayoutRoot_Loaded. It works, yes, but It does the layout process like 3 times and that is not efficient for the whole system...
C开发者_如何转开发an anybody help or at least explain how the layout system can be totally managed by the programmer? :-)
can you try to put your code inside
private void LayoutRoot_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e)
{
}
rather than calling Arrange()?
精彩评论