示例#1
0
        private void LayoutRecursive(GraphicalElement element)
        {
            element.Layout();

            foreach (GraphicalElement child in element.Children)
            {
                LayoutRecursive(child);
            }
        }
示例#2
0
        private void LayoutRecursive(GraphicalElement element, ref HashSet <GraphicalElement> updated)
        {
            if (updated.Contains(element) == false)
            {
                element.Layout();

                updated.Add(element);

                foreach (GraphicalElement child in element.Children)
                {
                    LayoutRecursive(child, ref updated);
                }
            }
        }