title: wpf treeview binding
body: <p>Is there any simple tutorial for beginners about <strong>treeview binding in WPF</strong>?</p>
  
  <p>What should we write in ItemsSource, DataType, ItemTemplate attributes if there's
  one List of items?</p>
  
  <pre><code>IList&lt;string&gt; items = new List&lt;string&gt;();
  items.Add("item1");
  items.Add("item2");
  items.Add("item3");
  </code></pre>
  
  <p>XAML code:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;TreeView Name="treeView1"&gt;  
      &lt;TreeView.Resources&gt; &lt;!-- what does it mean? --&gt;
          &lt;HierarchicalDataTemplate DataType="???" ItemsSource="{Binding ???}"&gt;&lt;/HierarchicalDataTemplate&gt;  
      &lt;/TreeView.Resources&gt;  
  &lt;/TreeView&gt;
  </code></pre>