90 references to SortOrder
System.Windows.Forms (68)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (3)
246
case
SortOrder
.None:
248
case
SortOrder
.Ascending:
250
case
SortOrder
.Descending:
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
482
SortOrder =
SortOrder
.None;
3962
public
SortOrder
SortOrder { get; private set; }
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (18)
214
GetSortingInformationFromBackend(out PropertyDescriptor? sortField, out
SortOrder
sortOrder);
225
_owner.Columns[i].HeaderCell.SortGlyphDirection =
SortOrder
.None;
230
_owner.SortOrder =
SortOrder
.None;
267
column.HeaderCell.SortGlyphDirection =
SortOrder
.None;
300
public
SortOrder
BoundColumnSortOrder(int boundColumnIndex)
304
return
SortOrder
.None;
307
GetSortingInformationFromBackend(out PropertyDescriptor? sortProperty, out
SortOrder
sortOrder);
309
if (sortOrder ==
SortOrder
.None)
312
return
SortOrder
.None;
321
return
SortOrder
.None;
972
private void GetSortingInformationFromBackend(out PropertyDescriptor? sortProperty, out
SortOrder
sortOrder)
976
sortOrder =
SortOrder
.None;
984
sortOrder = ibl.SortDirection == ListSortDirection.Ascending ?
SortOrder
.Ascending :
SortOrder
.Descending;
997
sortOrder = sorts[0]!.SortDirection == ListSortDirection.Ascending ?
SortOrder
.Ascending :
SortOrder
.Descending;
1003
sortOrder =
SortOrder
.None;
1010
sortOrder =
SortOrder
.None;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (14)
10473
if (SortedColumn is null && dataGridViewColumn.HeaderCell.SortGlyphDirection !=
SortOrder
.None)
13192
SortOrder =
SortOrder
.None;
13639
Debug.Assert(SortOrder !=
SortOrder
.None);
13640
if (SortOrder ==
SortOrder
.Ascending)
14263
dataGridViewColumn.HeaderCell.SortGlyphDirection =
SortOrder
.None;
16866
dataGridViewColumn.HeaderCell.SortGlyphDirectionInternal =
SortOrder
.None;
17120
SortOrder =
SortOrder
.None;
18930
if (dataGridViewColumnHeaderCell.SortGlyphDirection ==
SortOrder
.None)
18958
SortOrder = SortedColumn is not null ? SortedColumn.HeaderCell.SortGlyphDirection :
SortOrder
.None;
21529
ListSortDirection listSortDirection = SortedColumn == dataGridViewColumn && SortOrder ==
SortOrder
.Ascending ?
28243
SortedColumn.HeaderCell.SortGlyphDirection =
SortOrder
.None;
28250
SortOrder = (direction == ListSortDirection.Ascending) ?
SortOrder
.Ascending :
SortOrder
.Descending;
28259
SortOrder =
SortOrder
.None;
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (2)
274
((DataGridViewColumnHeaderCell)priorValue).SortGlyphDirectionInternal =
SortOrder
.None;
319
Debug.Assert(dataGridViewColumnHeaderCell.SortGlyphDirection ==
SortOrder
.None);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (1)
76
name += ", " + (dataGridView.SortOrder ==
SortOrder
.Ascending
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (11)
32
private
SortOrder
_sortGlyphDirection;
55
_sortGlyphDirection =
SortOrder
.None;
61
public
SortOrder
SortGlyphDirection
75
if (OwningColumn.SortMode == DataGridViewColumnSortMode.NotSortable && value !=
SortOrder
.None)
86
internal
SortOrder
SortGlyphDirectionInternal
90
Debug.Assert(value is >=
SortOrder
.None and <=
SortOrder
.Descending);
936
displaySortGlyph = (SortGlyphDirection !=
SortOrder
.None);
992
if (paint && SortGlyphDirection !=
SortOrder
.None &&
1008
if (SortGlyphDirection ==
SortOrder
.Ascending)
1093
Debug.Assert(SortGlyphDirection ==
SortOrder
.Descending);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellAccessibleObject.cs (1)
125
ListSortDirection listSortDirection = dataGridView.SortedColumn == dataGridViewCell.OwningColumn && dataGridView.SortOrder ==
SortOrder
.Ascending
System\Windows\Forms\Controls\ListView\ListView.cs (9)
55
private
SortOrder
_sorting =
SortOrder
.None;
702
case
SortOrder
.Ascending:
705
case
SortOrder
.Descending:
1494
[DefaultValue(
SortOrder
.None)]
1496
public
SortOrder
Sorting
1520
else if (value ==
SortOrder
.None)
1527
if (value ==
SortOrder
.None)
2255
if (!VirtualMode && _sorting !=
SortOrder
.None)
System\Windows\Forms\Controls\ListView\ListView.IconComparer.cs (4)
15
private
SortOrder
_sortOrder;
17
public IconComparer(
SortOrder
currentSortOrder)
22
public
SortOrder
SortOrder
35
if (_sortOrder ==
SortOrder
.Ascending)
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (2)
160
SortOrder
.Ascending => SR.SortedAscendingAccessibleStatus,
161
SortOrder
.Descending => SR.SortedDescendingAccessibleStatus,
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (1)
184
((_owner.Sorting !=
SortOrder
.None) && !_owner.VirtualMode))
System.Windows.Forms.Design (11)
System\Windows\Forms\Design\MaskDescriptorComparer.cs (3)
12
private readonly
SortOrder
_sortOrder;
22
public MaskDescriptorComparer(SortType sortType,
SortOrder
sortOrder)
64
return _sortOrder ==
SortOrder
.Descending ? -retVal : retVal;
System\Windows\Forms\Design\MaskDesignerDialog.cs (8)
35
private
SortOrder
_listViewSortOrder =
SortOrder
.Ascending;
170
_listViewCannedMasks.Sorting =
SortOrder
.None; // We'll do the sorting ourselves.
569
case
SortOrder
.None:
570
case
SortOrder
.Descending:
571
_listViewSortOrder =
SortOrder
.Ascending;
573
case
SortOrder
.Ascending:
574
_listViewSortOrder =
SortOrder
.Descending;
System.Windows.Forms.Design.Tests (8)
System\Windows\Forms\Design\MaskDescriptorComparerTests.cs (8)
28
MaskDescriptorComparer comparer = new(MaskDescriptorComparer.SortType.ByName,
SortOrder
.Ascending);
33
[InlineData(MaskDescriptorComparer.SortType.ByName,
SortOrder
.Ascending, -1)]
34
[InlineData(MaskDescriptorComparer.SortType.ByName,
SortOrder
.Descending, 1)]
35
[InlineData(MaskDescriptorComparer.SortType.BySample,
SortOrder
.Ascending, -1)]
36
[InlineData(MaskDescriptorComparer.SortType.BySample,
SortOrder
.Descending, 1)]
37
[InlineData(MaskDescriptorComparer.SortType.ByValidatingTypeName,
SortOrder
.Ascending, -1)]
38
[InlineData(MaskDescriptorComparer.SortType.ByValidatingTypeName,
SortOrder
.Descending, 1)]
39
internal void Compare_ShouldSortCorrectlyAccordingToSortTypeAndOrder(MaskDescriptorComparer.SortType sortType,
SortOrder
sortOrder, int expectedComparisonSign)
System.Windows.Forms.Tests (1)
System\Windows\Forms\ListViewTests.cs (1)
136
Assert.Equal(
SortOrder
.None, control.Sorting);
WinFormsControlsTest (2)
ListViewTest.cs (1)
72
Sorting =
SortOrder
.Ascending,
MultipleControls.cs (1)
37
Sorting =
SortOrder
.Ascending,