private void DataGridStandardSorting(object sender, DataGridSortingEventArgs e) { string sortPropertyName = SortHelpers.GetSortMemberPath(e.Column); if (!string.IsNullOrEmpty(sortPropertyName)) { // sorting is cleared when the previous state is Descending if (e.Column.SortDirection.HasValue && e.Column.SortDirection.Value == ListSortDirection.Descending) { int index = SortHelpers.FindSortDescription(Items.SortDescriptions, sortPropertyName); if (index != -1) { e.Column.SortDirection = null; // remove the sort description Items.SortDescriptions.RemoveAt(index); Items.Refresh(); if ((Keyboard.Modifiers & ModifierKeys.Shift) != ModifierKeys.Shift) { // clear any other sort descriptions for the multisorting case Items.SortDescriptions.Clear(); Items.Refresh(); } // stop the default sort e.Handled = true; } } } }