title: Expand Wpf Treeview to support Sorting
body: <p>Hi I created this small example, and I would like to expand it to support Sorting.</p>
  
  <pre><code>public class Country
  {
      public string Name { get; set; }
      public int SortOrder { get; set; }
  }
  </code></pre>
  
  <p>My xaml:</p>
  
  <pre><code>&lt;TreeView Name="CountryTreeView" ItemsSource="{Binding}"&gt;
    &lt;TreeView.ItemTemplate&gt;
      &lt;DataTemplate&gt;
        &lt;TextBlock Text="{Binding Path=Name}"/&gt;
      &lt;/DataTemplate&gt;
    &lt;/TreeView.ItemTemplate&gt;
  &lt;/TreeView&gt;
  </code></pre>
  
  <p>And the code-behind:</p>
  
  <pre><code>readonly ObservableCollection&lt;Country&gt; Countries;
  
  public MainWindow()
  {
     InitializeComponent();
  
     Countries = new ObservableCollection&lt;Country&gt;
     {
         new Country{Name = "Denmark", SortOrder = 0},
         new Country{Name = "Norway", SortOrder = 1},
         new Country{Name = "Sweden", SortOrder = 2},
         new Country{Name = "Iceland", SortOrder = 3},
         new Country{Name = "Greenland", SortOrder = 4},
     };
  
     CountryTreeView.DataContext = Countries;
  }
  </code></pre>
  
  <p>I would like to make it possible for the <code>Treeview</code> to Sort the <code>Countries</code> depending on the <code>SortOrder</code> value.</p>
  
  <p>It needs to be able to do this on the fly. 
  So if I for example change <code>SortOrder</code> = 10 for Name = "Denmark" the <code>TreeView</code> would automatically reflect this.</p>