WPF TreeView showing only root element
<p>I want to create dyamic tree structure, i have red some tutorials but i can't get it right. My wpf treeview is only showing root element. What am I doing wrong?</p>

<p>Here is MainWindow:</p>

<pre><code>&lt;Window x:Class="test.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:test"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525"&gt;
  &lt;Grid&gt;
    &lt;TreeView Name="tv" ItemsSource="{Binding}"&gt;
      &lt;TreeView.ItemTemplate&gt;
        &lt;HierarchicalDataTemplate DataType="{x:Type local:Leaf}"
                                  ItemsSource="{Binding Childs}"&gt;            
          &lt;TextBlock Text="{Binding Path=Name}" /&gt;
        &lt;/HierarchicalDataTemplate&gt;
      &lt;/TreeView.ItemTemplate&gt;
    &lt;/TreeView&gt;
  &lt;/Grid&gt;
&lt;/Window&gt;
</code></pre>

<p>Here is my node class    </p>

<pre><code>class Leaf
{
    public string Name { get; set; }
    public string Address { get; set; }
    public string Access { get; set; }
    public string Type { get; set; }
    public object Value { get; set; }
    public List&lt;Leaf&gt; Childs;

    public Leaf()
    {
        this.Name = "default";
        this.Childs = new List&lt;Leaf&gt;();
    }
}

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();

        List&lt;Leaf&gt; mainlist = new List&lt;Leaf&gt;();

        Leaf one = new Leaf();
        one.Name = "one";

        var two = new Leaf();
        two.Name = "two";

        one.Childs.Add(two);

        mainlist.Add(one);

        tv.DataContext = mainlist;
    }
}
</code></pre>