Blazor | ComponentOne
Controls / TreeView / TreeLines
In This Topic
    TreeLines
    In This Topic

    Tree lines, as the name suggests, are the lines connecting the nodes of a TreeView displaying the relationship between parent and child nodes clearly. By default, TreeView does not show treelines. However, you can display the treelines by setting ShowLines property of the C1TreeView class to true.

    The following image shows TreeView with the treelines.

    TreeView with customized tree lines

    The following code demonstrates how to display the treelines programmatically.

    TreeLines.razor
    Copy Code
    @using C1.Blazor.TreeView
    
    <C1TreeView ShowLines="true">
        <TreeViewItem Header="Devices">
            <TreeViewItem Header="Mobiles">
                <TreeViewItem Header="Apple" />
                <TreeViewItem Header="Xiaomi" />
                <TreeViewItem Header="Nokia" />
            </TreeViewItem>
            <TreeViewItem Header="Tablets" />
            <TreeViewItem Header="Monitor" />
        </TreeViewItem>
        <TreeViewItem Header="Appliances">
            <TreeViewItem Header="Television" />
            <TreeViewItem Header="Washing Machine" />
        </TreeViewItem>        
        </C1TreeView>