Implemented interface member:
54 references to Count
System.Windows.Forms (39)
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (3)
126if (value < 0 || value > (ListView.Columns.Count - 1)) 133int[] colsOrder = new int[ListView.Columns.Count]; 139for (int i = 0; i < ListView.Columns.Count; i++)
System\Windows\Forms\Controls\ListView\ListView.ColumnHeaderCollection.cs (16)
148for (int i = 0; i < Count; i++) 167return (index >= 0) && (index < Count); 181return _owner.InsertColumn(Count, columnHeader); 186int index = Count; 197return _owner.InsertColumn(Count, columnHeader); 209return _owner.InsertColumn(Count, columnHeader); 219return _owner.InsertColumn(Count, columnHeader); 230return _owner.InsertColumn(Count, columnHeader); 242return _owner.InsertColumn(Count, columnHeader); 254return _owner.InsertColumn(Count, columnHeader); 371if (Count > 0) 373Array.Copy(_owner._columnHeaders!, 0, dest, index, Count); 379for (int index = 0; index < Count; ++index) 403ArgumentOutOfRangeException.ThrowIfGreaterThan(index, Count); 515int[] indices = new int[Count - 1]; 518for (int i = 0; i < Count; i++)
System\Windows\Forms\Controls\ListView\ListView.cs (11)
2397for (int i = 0; i < Columns.Count; i++) 2400Debug.Assert(Columns[i].DisplayIndex > -1 && Columns[i].DisplayIndex < Columns.Count, "display indices out of whack"); 2403int colsCount = Columns.Count; 3576if (View == View.Details && Columns.Count == 0) 3605if (View == View.Details && Columns.Count == 0) 3646ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(subItemIndex, Columns.Count); 3652if (Columns.Count == 0) 3861int[] indices = new int[Columns.Count]; 3862for (int i = 0; i < Columns.Count; i++) 6210int[] indices = new int[Columns.Count]; 6211for (int i = 0; i < Columns.Count; i++)
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (3)
40=> this.TryGetOwnerAs(out ListView? owningListView) ? owningListView.Columns.Count : base.ColumnCount; 173var columnHeaders = new IRawElementProviderSimple.Interface[owningListView.Columns.Count]; 328for (int i = 1; i < owningListView.Columns.Count; i++)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (3)
23private int LastChildIndex => HasImage ? _owningListView.Columns.Count : _owningListView.Columns.Count - 1; 107for (int i = 0; i < _owningListView.Columns.Count; i++)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (2)
54|| _owningListView.Columns.Count <= index 109int subItemCount = Math.Min(_owningListView.Columns.Count, _owningItem.SubItems.Count);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
53if (!_owningListView.FullRowSelect && index == ParentInternal.FirstSubItemIndex && _owningListView.Columns.Count > 1)
System.Windows.Forms.Tests (14)
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (3)
43AccessibleObject expected = item.SubItems[control.Columns.Count - 1].AccessibilityObject; 55int outRangeIndex = control.Columns.Count + 1; 107Assert.Equal(control.Columns.Count, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
1015for (int i = 0; i < columns.Count; i++)
System\Windows\Forms\ColumnHeaderCollectionTests.cs (10)
363Assert.Equal(2, collection.Count); 399Assert.Equal(5, collection.Count); 709Assert.Equal(2, collection.Count); 943Assert.Equal(3, collection.Count); 950Assert.Equal(2, collection.Count); 979Assert.Equal(3, collection.Count); 986Assert.Equal(2, collection.Count); 1018Assert.Equal(3, collection.Count); 1025Assert.Equal(2, collection.Count); 1083Assert.Equal(expectedCount, collection.Count);
WinFormsControlsTest (1)
ListViewTest.cs (1)
228listView2.Columns[random.Next(0, listView2.Columns.Count)].ImageIndex = random.Next(0, 2);