title: Silverlight recursivly bind Treeview to XDocument
body: <p>How can I recursivly bind a Treeview to an XDocument, mapping each XML Element to a Node in the Treeview?</p>
  
  <p>The code below should work from my perspective (and also according to the very few posts I found regarding direct binding), however it does not:</p>
  
  <pre><code>&lt;sdk:TreeView ItemsSource="{Binding Path=Elements}" DataContext="{Binding Path=Data}"&gt;
    &lt;sdk:TreeView.ItemTemplate&gt;
     &lt;data:HierarchicalDataTemplate ItemsSource="{Binding Path=Elements}"&gt;
      &lt;StackPanel Orientation="Vertical"&gt;
       &lt;TextBlock Text="{Binding Name}"/&gt;
      &lt;/StackPanel&gt;
     &lt;/data:HierarchicalDataTemplate&gt;
    &lt;/sdk:TreeView.ItemTemplate&gt;
  &lt;/sdk:Treeview&gt;
  </code></pre>
  
  <p>(Data is a Property of type XElement on the parents' DataContext)</p>
  
  <p>Did I make a mistake somewhere or do I really need to implement an IValueConverter just to get at the child elements of an XElement?</p>