0x90d
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
12 additions and
4 deletions
-
src/Avalonia.Controls.DataGrid/DataGridColumn.cs
|
|
|
@ -653,21 +653,29 @@ namespace Avalonia.Controls |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Clears the current sort direction
|
|
|
|
/// </summary>
|
|
|
|
public void ClearSort() |
|
|
|
{ |
|
|
|
//InvokeProcessSort is already validating if sorting is possible
|
|
|
|
_headerCell?.InvokeProcessSort(Input.KeyModifiers.Control); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Switches the current state of sort direction
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="clear">Clear the current sort direction instead</param>
|
|
|
|
public void PerformSort(bool? clear) |
|
|
|
public void Sort() |
|
|
|
{ |
|
|
|
//InvokeProcessSort is already validating if sorting is possible
|
|
|
|
_headerCell?.InvokeProcessSort(clear == true ? Input.KeyModifiers.Control : Input.KeyModifiers.None); |
|
|
|
_headerCell?.InvokeProcessSort(Input.KeyModifiers.None); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Changes the sort direction of this column
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="direction">New sort direction</param>
|
|
|
|
public void PerformSort(ListSortDirection direction) |
|
|
|
public void Sort(ListSortDirection direction) |
|
|
|
{ |
|
|
|
//InvokeProcessSort is already validating if sorting is possible
|
|
|
|
_headerCell?.InvokeProcessSort(Input.KeyModifiers.None, direction); |
|
|
|
|