Overview

Namespace: TheTechIdea.Beep.Winform.Controls.Design.Server.Dialogs
Inheritance: System.Windows.Forms.Form | Visibility: internal sealed

LayoutTreeDialog(BeepDocumentHost host) builds a read-only dialog window with a title showing the group count, a multi-line read-only TextBox with scroll bars, and a Close button. The TextBox displays the indented tree representation of host.LayoutRoot. Useful after layout preset picking or programmatic SplitDocument calls to verify the resulting structure.

The rendering is done by FormatLayoutTree(ILayoutNode node, int depth), a static recursive method: for GroupLayoutNode, outputs document count and optionally the active document ID; for SplitLayoutNode, outputs orientation (Horizontal/Vertical), ratio, and recurses into First and Second children.

Tree Format

Root (4 groups)
  Group "main" (2 documents, active: "editor1.cs")
    Split H (0.6)
      Group (1 document, active: "editor1.cs")
        editor1.cs
      Group (1 document, active: "output")
        Output
  Group "left" (2 documents, active: "explorer")
    Solution Explorer
    Toolbox

Examples

// Open from BeepDocumentHostDesigner verb or smart-tag:
// Right-click host > "View Layout Tree..."
// Smart-tag > Nested Splits > LayoutTreeInfo (read-only)

// Programmatic use:
var dialog = new LayoutTreeDialog(host);
dialog.ShowDialog();
// Shows read-only tree of all groups, splits, and documents