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