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