@model IEnumerable<TreeViewData>

<h1>
    Initial State
</h1>

<p>
    By default, the TreeView expands the first node at each
    level and collapsed all others when it is bound to some
    data:
</p>
@Html.C1().TreeView().Id("theTree").Bind(Model).DisplayMemberPath("Header").ChildItemsPath("Items")

<h2>
    Selecting a default item
</h2>
<p>
    If you select an item when the tree loads, it will
    automatically ensure the selected node is visible,
    expanding the tree and scrolling as needed.
    In this case, we selected the 'Solar Panel' item:
</p>
@Html.C1().TreeView().Id("theTreeSelected").Bind(Model).DisplayMemberPath("Header").ChildItemsPath("Items")

<h2>
    Collapsing to a given Level
</h2>
<p>
    Use the <b>collapseToLevel</b> method to collapse or expand
    the tree to a given level when it loads. For example, the
    trees below start totally collapsed and totally expanded:
</p>
@Html.C1().TreeView().Id("theTreeCollapsed").Bind(Model).DisplayMemberPath("Header").ChildItemsPath("Items")
@Html.C1().TreeView().Id("theTreeExpanded").Bind(Model).DisplayMemberPath("Header").ChildItemsPath("Items")
