title: treeview Multibinding in wpf
body: <p>I want to bind a treeview to a class like this one:</p>
  
  <pre><code>public class Folder : Base_FileFolder
  {
      public Folder()
      {
          Folders = new ObservableCollection&lt;Folder&gt;();
          Files = new ObservableCollection&lt;File&gt;();
      }
      public ObservableCollection&lt;Folder&gt; Folders { get; set; }
      public ObservableCollection&lt;File&gt; Files { get; set; }
  }
  </code></pre>
  
  <p>the other classes ares:</p>
  
  <pre><code>public class File : Base_FileFolder
  {
  }
  
  public class Base_FileFolder : DependencyObject
  {
      public string Name
      {
          get { return (string)GetValue(NameProperty); }
          set { SetValue(NameProperty, value); }
      }
      public static readonly DependencyProperty NameProperty = DependencyProperty.Register("Name", typeof(string), typeof(Base_FileFolder), new UIPropertyMetadata(""));
  }
  </code></pre>
  
  <p>How can I create a treeview that shows Files and Folders collection</p>
  
  <p>I want to use something like this: </p>
  
  <pre><code> &lt;HierarchicalDataTemplate
   DataType="{x:Type model:Folder}"
   ItemsSource="{Binding Childs}"&gt;   
   &lt;DockPanel&gt;
         &lt;Label Content="{Binding Name}"/&gt;    &lt;/DockPanel&gt;
   &lt;/HierarchicalDataTemplate&gt;
  </code></pre>
  
  <p>so I get Somethign like this:</p>
  
  <p>rootFolder</p>
  
  <pre><code>|
  |-File
  |-File
  |-Folder
    |-File
    |-File
    |-Folder
      |-File
  </code></pre>