private void ArrangeRoot()
        {
            var rootLayoutNode = HorizontalStraightLayoutNode.AttachTo(Document.Root, Scene.FindRenderNode(Document.Root), null);

            rootLayoutNode.MoveTo(MindmapCenter, NodeSide.Auto);

            Arrange(rootLayoutNode, Document.Root.LeftChildren, -1.0f, NodeSide.Right);
            Arrange(rootLayoutNode, Document.Root.RightChildren, 1.0f, NodeSide.Left);
        }
        private void UpdateSizeWithChildren(HorizontalStraightLayoutNode parent, IReadOnlyCollection <Node> children, bool isCollapsed)
        {
            var treeW = parent.RenderSize.X;
            var treeH = parent.RenderSize.Y;

            if (children.Count > 0)
            {
                if (isCollapsed)
                {
                    foreach (var child in children)
                    {
                        var childData = HorizontalStraightLayoutNode.AttachTo(child, Scene.FindRenderNode(child), parent);

                        UpdateSizeWithChildren(childData, child.Children, child.IsCollapsed);
                    }
                }
                else
                {
                    float childsW = 0;
                    float childsH = 0;

                    foreach (var child in children)
                    {
                        var childData = HorizontalStraightLayoutNode.AttachTo(child, Scene.FindRenderNode(child), parent);

                        UpdateSizeWithChildren(childData, child.Children, child.IsCollapsed);

                        childsH += childData.TreeHeight;
                        childsW  = Math.Max(childData.TreeWidth, childsW);
                    }

                    treeW += Layout.HorizontalMargin;
                    treeW += childsW;
                    treeH  = childsH;
                }
            }

            treeH += 2 * Layout.ElementMargin;

            parent.TreeSize = new Vector2(treeW, treeH);
        }