title: How to set SortDescriptions of CollectionView in C#
body: <p>I have defined SortDescriptions and GroupDescriptions in XAML.</p>
  
  <pre><code>        &lt;CollectionViewSource x:Key="DefaultGrouping" Source="{Binding Projects}"&gt;
              &lt;CollectionViewSource.SortDescriptions&gt;
                  &lt;componentModel:SortDescription PropertyName="ProjectName" Direction="Ascending" /&gt;
                  &lt;componentModel:SortDescription PropertyName="CreationDate" Direction="Descending"/&gt;
                  &lt;componentModel:SortDescription PropertyName="LastUsedTime" Direction="Descending"/&gt;
              &lt;/CollectionViewSource.SortDescriptions&gt;
              &lt;CollectionViewSource.GroupDescriptions&gt;
                  &lt;PropertyGroupDescription PropertyName="Default"/&gt;
              &lt;/CollectionViewSource.GroupDescriptions&gt;
          &lt;/CollectionViewSource&gt;
  </code></pre>
  
  <p>And now I want to change the SortDescriptions in the code of my viewmodel. But with following code I get an empty ListCollectionView. </p>
  
  <p><code>CollectionViewSource.GetDefaultView(this.Projects);</code>  </p>
  
  <p>Is there any way to get the right CollectionView?</p>