title: SortDirection always Ascending in WPF
body: <p>This is my datagrid snippet:</p>
  
  <pre><code>&lt;DataGrid Margin="0,4,0,0" Grid.Row="2" CanUserSortColumns="True" x:Name="grvDocs" Sorting="grvDocs_Sorting" AutoGenerateColumns="False"&gt;
   &lt;DataGrid.Columns&gt;
                  &lt;DataGridTemplateColumn Header="Efile ID" Width="100" SortMemberPath="d.DocumentID"&gt;
                      &lt;DataGridTemplateColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;TextBlock Text="{Binding DocumentID}"/&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/DataGridTemplateColumn.CellTemplate&gt;
                  &lt;/DataGridTemplateColumn&gt;
  ...
  </code></pre>
  
  <p>This is C# code:</p>
  
  <pre><code> private void grvDocs_Sorting(object sender, DataGridSortingEventArgs e)
      {
          DataGridColumn column = e.Column;
  
          ListSortDirection direction = (column.SortDirection != ListSortDirection.Ascending) ? ListSortDirection.Ascending : ListSortDirection.Descending;
          //set the sort order on the column
          column.SortDirection = direction;
          e.Handled = true;
  
          BindDocuments(0, "LastStatusChangedDateTime", e.Column.SortDirection);
  
      }
  </code></pre>
  
  <p>Yet when I check <code>e.Column.SortDirection</code> it is always Ascending. Any idea how to solve this issue? I feel more like WTF rather than WPF.</p>