@model IEnumerable<TreeViewData>

@section Scripts{
<script>
    var newImageUrl = '@Href("~/Content/images/new.png")';
</script>
}

<h1>
    Custom Node Content
</h1>

<p>
    You can customize the content of the TreeView nodes using the <b>formatItem</b>
    event. The event handler parameters include the element that represents the node
    and the data item being rendered.
</p>
<p>
    The example below uses the <b>formatItem</b> event to add a "new" badge to the
    right of new items on the tree.
</p>

@Html.C1().TreeView().Id("theTree").Bind(Model).DisplayMemberPath("Header").ChildItemsPath("Items")