967 references to Items
Accessibility_Core_App (5)
CommonControl1.cs (3)
46
listView1.Groups[0].Items.Add(listView1.
Items
[0]);
47
listView1.Groups[1].Items.AddRange(listView1.
Items
[1], listView1.
Items
[2]);
CommonControl1.Designer.cs (1)
382
this.listView1.
Items
.AddRange(new System.Windows.Forms.ListViewItem[] {
DataBindingExample.cs (1)
104
listView1.
Items
.Add(item);
System.Windows.Forms (121)
System\Windows\Forms\Controls\ListView\ListView.CheckedIndexCollection.cs (6)
37
foreach (ListViewItem item in _owner.
Items
)
55
for (int i = 0; i < _owner.
Items
.Count && index < indices.Length; ++i)
57
if (_owner.
Items
[i].Checked)
77
int cnt = _owner.
Items
.Count;
81
ListViewItem item = _owner.
Items
[i];
145
if (_owner.
Items
[checkedIndex].Checked)
System\Windows\Forms\Controls\ListView\ListView.CheckedListViewItemCollection.cs (4)
50
for (int i = 0; i < _owner.
Items
.Count && index < items.Length; ++i)
52
if (_owner.
Items
[i].Checked)
54
items[index++] = _owner.
Items
[i];
75
return _owner.
Items
[itemIndex];
System\Windows\Forms\Controls\ListView\ListView.cs (84)
28
[DefaultProperty(nameof(
Items
))]
816
return
Items
[displayIndex];
1719
return
Items
.Count > 0 ?
Items
[0] : null;
1723
return _topIndex >= 0 && _topIndex <
Items
.Count ?
Items
[_topIndex] : null;
1755
if ((topItem is null) && (_topIndex ==
Items
.Count))
1891
ListViewItem lvItem =
Items
[topIndex];
1915
if (value &&
Items
.Count > 0)
2452
Items
.Clear();
2479
&&
Items
.Count > 0)
2505
Items
.Count > 0)
2522
for (int i = 0; i <
Items
.Count; i++)
2524
if (
Items
[i].ImageIndexer.ActualIndex > -1)
2641
Items
[(int)nmcd->nmcd.dwItemSpec],
2711
if (nmcd->iSubItem <
Items
[itemIndex].SubItems.Count)
2717
if (nmcd->iSubItem == 0 &&
Items
[itemIndex].SubItems.Count > 1)
2731
Items
[itemIndex],
2732
Items
[itemIndex].SubItems[nmcd->iSubItem],
2753
ListViewItem item =
Items
[(int)nmcd->nmcd.dwItemSpec];
3081
Items
.Clear();
3185
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index,
Items
.Count);
3193
public ListViewItem? FindItemWithText(string text) =>
Items
.Count == 0
3203
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(startIndex,
Items
.Count);
3269
if (
Items
.Count == 0)
3285
return sviEvent.Index != -1 ?
Items
[sviEvent.Index] : null;
3316
return
Items
[index];
3322
for (int i = startIndex; i <
Items
.Count; i++)
3324
ListViewItem listViewItem =
Items
[i];
3486
li =
Items
[displayIndex];
3575
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index,
Items
.Count);
3604
if (index < 0 || index >=
Items
.Count)
3640
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex,
Items
.Count);
3645
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(subItemIndex,
Items
[itemIndex].SubItems.Count);
3719
ListViewItem? item = (iItem == -1) ? null :
Items
[iItem];
3945
for (int i = 0; i <
Items
.Count; i++)
3947
ListViewItem item =
Items
[i];
3959
for (int i = 0; i <
Items
.Count; i++)
3961
ListViewItem item =
Items
[i];
3997
if (IsHandleCreated &&
Items
.Count == 0 && View == View.SmallIcon && Application.ComCtlSupportsVisualStyles)
4118
Debug.Assert(
Items
.Contains(li), "Make sure ListView.Items contains this item before adding the native LVITEM. Otherwise, custom-drawing may break.");
4310
foreach (ListViewItem item in
Items
)
4366
if (
Items
.Count > 0)
4650
for (int i = 0; i <
Items
.Count; i++)
4652
if (
Items
[i].Checked)
4654
UpdateSavedCheckedItems(
Items
[i], true /*addItem*/);
4666
int count =
Items
.Count;
4669
Items
[i].UpdateStateFromListView(i, true);
4686
ListViewItemCollection tempItems =
Items
;
4708
if (ShowItemToolTips &&
Items
.Count > 0 && (FocusedItem ??
Items
[0]) is ListViewItem focusedItem)
4855
ListViewItem firstSelectedItem =
Items
[SelectedIndices[0]];
4924
int subItemCount =
Items
[i].SubItems.Count;
4927
SetItemText(i, j,
Items
[i].SubItems[j].Text, ref item);
4982
int maxSize = VirtualMode ? VirtualListSize :
Items
.Count;
4999
Rectangle rectInvalid =
Items
[startIndex].Bounds;
5002
rectInvalid = Rectangle.Union(rectInvalid,
Items
[index].Bounds);
5007
rectInvalid = Rectangle.Union(rectInvalid,
Items
[startIndex - 1].Bounds);
5016
if (endIndex <
Items
.Count - 1)
5018
rectInvalid = Rectangle.Union(rectInvalid,
Items
[endIndex + 1].Bounds);
5048
for (int i = 0; i <
Items
.Count; i++)
5050
Items
.GetItemByIndex(i)?.ReleaseUiaProvider();
5501
if (itemIndex < 0 || itemIndex >=
Items
.Count)
5570
else if (
Items
is not null)
5572
s += $", Items.Count: {
Items
.Count}";
5573
if (
Items
.Count > 0 && !VirtualMode)
5575
string z = (
Items
[0] is null) ? "null" :
Items
[0].ToString();
5834
ListViewItem clickedItem =
Items
[displayIndex];
5875
ListViewItem clickedItem =
Items
[displayIndex];
6336
foreach (ListViewItem listViewItem in
Items
)
6488
Items
[dispInfo->item.iItem].Text = text;
6506
ListViewItem item =
Items
[nmlv->iItem];
6521
ListViewItem item =
Items
[nmlv->iItem];
6562
ItemCheckedEventArgs e = new(
Items
[nmlv->iItem]);
6574
if (indexItem >= 0 && indexItem <
Items
.Count)
6578
ListViewItem item =
Items
[indexItem];
6616
if (
Items
.Count > 0)
6618
ListViewItemSelectionChangedEventArgs lvisce = new(
Items
[nmlv->iItem],
6626
if (
Items
.Count == 0 ||
Items
[^1] is not null)
6814
ListViewItem lvi =
Items
[infoTip->iItem];
7056
if (FocusedItem is null &&
Items
.Count > 0)
7058
Items
[0].Focused = true;
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (9)
51
foreach (ListViewItem? item in owningListView.
Items
)
68
=> this.TryGetOwnerAs(out ListView? owningListView) ? owningListView.
Items
.Count : base.RowCount;
103
return index < owningListView.
Items
.Count ? owningListView.
Items
[index].AccessibilityObject : null;
113
int count = owningListView.GroupsDisplayed ? GetVisibleGroups().Count : owningListView.
Items
.Count;
128
return index < owningListView.
Items
.Count ? index : InvalidIndex;
219
return owningListView.
Items
.Count == 0 ? null : owningListView.
Items
[^1].AccessibilityObject;
252
selectedItemProviders[i] = owningListView.
Items
[owningListView.SelectedIndices[i]].AccessibilityObject;
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (4)
225
int count = _owner.
Items
.Count;
234
ListViewItem item = _owner.
Items
[i];
281
int count = _owner.
Items
.Count;
285
ListViewItem item = _owner.
Items
[i];
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (6)
170
if (selectedIndex < 0 || selectedIndex >= _owner.
Items
.Count)
175
return _owner.
Items
[selectedIndex].Selected;
274
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex, _owner.
Items
.Count);
276
_owner.
Items
[itemIndex].Selected = true;
329
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex, _owner.
Items
.Count);
331
_owner.
Items
[itemIndex].Selected = false;
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (2)
49
lvitems[i] = _owner.
Items
[fidx];
139
return _owner.
Items
[fidx];
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (1)
203
foreach (ListViewItem? listViewItem in _owningListView.
Items
)
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
1181
public virtual void Remove() => _listView?.
Items
.Remove(this);
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (4)
50
neighboringRectangles.Add(_listView.
Items
[Index - 1].AccessibilityObject.Bounds);
53
if (Index < _listView.
Items
.Count - 1)
55
neighboringRectangles.Add(_listView.
Items
[Index + 1].AccessibilityObject.Bounds);
89
ListViewItem item = _listView.
Items
[index];
System.Windows.Forms.Design (11)
System\Windows\Forms\Design\ListViewActionList.cs (1)
22
EditorServiceContext.EditValue(_designer, Component!, nameof(ListView.
Items
));
System\Windows\Forms\Design\MaskDesignerDialog.cs (8)
463
if (maskDexIndex < 0 || _listViewCannedMasks.
Items
.Count <= maskDexIndex)
468
_listViewCannedMasks.
Items
[maskDexIndex].Selected = true;
469
_listViewCannedMasks.FocusedItem = _listViewCannedMasks.
Items
[maskDexIndex];
505
_listViewCannedMasks.
Items
.Clear();
520
_listViewCannedMasks.
Items
.Add(new ListViewItem([maskDescriptor.Name!, sample, validatingType]));
525
_listViewCannedMasks.
Items
.Add(new ListViewItem([_customMaskDescriptor.Name, "", nullEntry]));
601
if (_listViewCannedMasks.FocusedItem is not null || _listViewCannedMasks.
Items
.Count <= 0)
606
_listViewCannedMasks.
Items
[0].Focused = true;
System\Windows\Forms\Design\StyleEditorForm.cs (2)
575
_columnsAndRowsListView.
Items
.Clear();
600
_columnsAndRowsListView.
Items
.Add(new ListViewItem([baseName + (i + 1).ToString(CultureInfo.InvariantCulture), sizeType, sizeValue]));
System.Windows.Forms.Tests (752)
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (90)
86
listView.
Items
.Add(new ListViewItem());
93
listView.
Items
.Add(item);
94
listView.
Items
.Add(item2);
116
listView.
Items
.Add(new ListViewItem());
123
listView.
Items
.Add(item);
124
listView.
Items
.Add(item2);
140
listView.
Items
.Add(new ListViewItem());
147
listView.
Items
.Add(item);
148
listView.
Items
.Add(item2);
164
listView.
Items
.Add(new ListViewItem());
165
listView.
Items
.Add(new ListViewItem());
181
listView.
Items
.Add(new ListViewItem());
182
listView.
Items
.Add(new ListViewItem());
296
listView.
Items
.Add(listViewItem1);
297
listView.
Items
.Add(listViewItem2);
420
listView.
Items
.Add(listViewItem1);
421
listView.
Items
.Add(listViewItem2);
422
listView.
Items
.Add(listViewItem3);
543
listView.
Items
.Add(listViewItem1);
544
listView.
Items
.Add(listViewItem2);
545
listView.
Items
.Add(listViewItem3);
614
listView.
Items
.Add(listViewItem1);
615
listView.
Items
.Add(listViewItem2);
616
listView.
Items
.Add(listViewItem3);
670
listView.
Items
.Add(listViewItem1);
671
listView.
Items
.Add(listViewItem2);
672
listView.
Items
.Add(listViewItem3);
688
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].AccessibilityObject));
689
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[1].AccessibilityObject));
690
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[2].AccessibilityObject));
694
Assert.Equal(0, accessibleObject.GetChildIndex(listView.
Items
[0].AccessibilityObject));
695
Assert.Equal(1, accessibleObject.GetChildIndex(listView.
Items
[1].AccessibilityObject));
696
Assert.Equal(2, accessibleObject.GetChildIndex(listView.
Items
[2].AccessibilityObject));
752
listView.
Items
.Add(listViewItem1);
753
listView.
Items
.Add(listViewItem2);
754
listView.
Items
.Add(listViewItem3);
770
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].AccessibilityObject));
771
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[1].AccessibilityObject));
772
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[2].AccessibilityObject));
776
Assert.Equal(0, accessibleObject.GetChildIndex(listView.
Items
[0].AccessibilityObject));
777
Assert.Equal(1, accessibleObject.GetChildIndex(listView.
Items
[1].AccessibilityObject));
778
Assert.Equal(2, accessibleObject.GetChildIndex(listView.
Items
[2].AccessibilityObject));
884
listView.
Items
.Add(listViewItem1);
885
listView.
Items
.Add(listViewItem2);
886
listView.
Items
.Add(listViewItem3);
930
listView.
Items
.Add(listItem1);
931
listView.
Items
.Add(listItem2);
932
listView.
Items
.Add(listItem3);
933
listView.
Items
.Add(listItem4);
935
listView.
Items
[0].Selected = true;
936
listView.
Items
[1].Selected = true;
937
listView.
Items
[3].Selected = true;
958
listView.
Items
.Add(listItem1);
976
listView.
Items
.Add(listItem1);
1036
listView.
Items
[0].Selected = true;
1037
listView.
Items
[1].Selected = true;
1038
listView.
Items
[3].Selected = true;
1151
listView.
Items
.Add(new ListViewItem(["Item 1", "SubItem 1"]));
1152
listView.
Items
.Add(new ListViewItem(["Item 1", "SubItem 1"]));
1174
listView.
Items
.Add(new ListViewItem(["Item 1", "SubItem 1"]));
1175
listView.
Items
.Add(new ListViewItem(["Item 1", "SubItem 1"]));
1194
listView.
Items
.Add(new ListViewItem(["Item 1", "SubItem 11", "SubItem 12"]));
1195
listView.
Items
.Add(new ListViewItem(["Item 2", "SubItem 21", "SubItem 22"]));
1199
Assert.Equal(listView.
Items
[0].SubItems[0].AccessibilityObject, HitTest(listView, GetSubItemLocation(0, 0)));
1200
Assert.Equal(listView.
Items
[0].SubItems[1].AccessibilityObject, HitTest(listView, GetSubItemLocation(0, 1)));
1201
Assert.Equal(listView.
Items
[0].SubItems[2].AccessibilityObject, HitTest(listView, GetSubItemLocation(0, 2)));
1202
Assert.Equal(listView.
Items
[1].SubItems[0].AccessibilityObject, HitTest(listView, GetSubItemLocation(1, 0)));
1203
Assert.Equal(listView.
Items
[1].SubItems[1].AccessibilityObject, HitTest(listView, GetSubItemLocation(1, 1)));
1204
Assert.Equal(listView.
Items
[1].SubItems[2].AccessibilityObject, HitTest(listView, GetSubItemLocation(1, 2)));
1220
listView.
Items
.Add(new ListViewItem(["Item 1"]));
1221
listView.
Items
.Add(new ListViewItem(["Item 2"]));
1229
((ListViewItemDetailsAccessibleObject)listView.
Items
[itemIndex].AccessibilityObject).GetDetailsSubItemOrFake(subItemIndex);
1320
expectedValues.Add(listView.
Items
[0].AccessibilityObject);
1321
expectedValues.Add(listView.
Items
[1].AccessibilityObject);
1322
expectedValues.Add(listView.
Items
[2].AccessibilityObject);
1367
: listView.
Items
[0].AccessibilityObject;
1371
: listView.
Items
[3].AccessibilityObject;
1427
listView.
Items
.Add(listItem1);
1428
listView.
Items
.Add(listItem2);
1429
listView.
Items
.Add(listItem3);
1430
listView.
Items
.Add(listItem4);
1490
listView.
Items
.Add(listViewItem1);
1491
listView.
Items
.Add(listViewItem2);
1575
listView.
Items
.Add(listViewItem1);
1576
listView.
Items
.Add(listViewItem2);
1676
listView.
Items
.Add(listViewItem1);
1677
listView.
Items
.Add(listViewItem2);
1733
listView.
Items
.Add(listViewItem1);
1734
listView.
Items
.Add(listViewItem2);
1751
listView.
Items
.AddRange(Enumerable.Range(0, 11).Select(i => new ListViewItem()).ToArray());
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (38)
86
list.
Items
.Add(new ListViewItem());
142
ListViewItemCollection items = listView.
Items
;
212
ListViewItemCollection items = listView.
Items
;
284
list.
Items
.Add(listItem1);
285
list.
Items
.Add(listItem2);
328
listView.
Items
.Add(new ListViewItem("a", group));
375
ListViewItemCollection items = listView.
Items
;
470
ListViewItemCollection items = listView.
Items
;
506
ListViewItemCollection items = listView.
Items
;
590
ListViewItemCollection items = listView.
Items
;
683
listView.
Items
.Add(listViewItem);
713
listView.
Items
.Add(new ListViewItem("Item1", lvgroup1));
722
listView.
Items
.Add(new ListViewItem("Item2", lvgroup2));
747
listView.
Items
.Add(new ListViewItem("Group Item 1", listViewGroup));
748
listView.
Items
.Add(new ListViewItem("Group Item 2", listViewGroup));
800
listView.
Items
.AddRange((ListViewItem[])[item1, item2, item3]);
891
listView.
Items
.Add(listViewItem1);
892
listView.
Items
.Add(listViewItem2);
976
listView.
Items
.Add(listView.Groups[0].Items[0]);
977
listView.
Items
.Add(listView.Groups[0].Items[3]);
1002
listView.
Items
.RemoveAt(1);
1045
listView.
Items
.Add(listView.Groups[0].Items[0]);
1046
listView.
Items
.Add(listView.Groups[0].Items[3]);
1069
listView.
Items
.RemoveAt(1);
1073
listView.
Items
.RemoveAt(0);
1115
listView.
Items
.Add(listView.Groups[0].Items[0]);
1116
listView.
Items
.Add(listView.Groups[0].Items[3]);
1141
listView.
Items
.RemoveAt(1);
1220
listView.
Items
.Add(new ListViewItem());
1242
listView.
Items
.Add(listViewItem1);
1243
listView.
Items
.Add(listViewItem2);
1270
listView.
Items
.Add(listItem1);
1271
listView.
Items
.Add(listItem2);
1272
listView.
Items
.Add(listItem3);
1333
listView.
Items
.Add(item);
1408
listView.
Items
.AddRange((ListViewItem[])[listViewVisibleItem1, listViewVisibleItem2]);
1458
listView.
Items
.Add(listViewItem1);
1459
listView.
Items
.Add(listViewItem2);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (202)
18
list.
Items
.Add(listItem);
37
list.
Items
.Add(listItem);
80
listView.
Items
.Add(listViewItem2);
95
list.
Items
.Add(listItem);
145
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
146
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
147
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
148
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
161
? listView.
Items
[index].Group is not null
196
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
197
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
198
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
199
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
225
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
226
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
227
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
228
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
243
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
244
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
245
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
246
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
272
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
273
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
274
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
275
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
307
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
308
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
309
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
310
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
328
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
329
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
330
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
331
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
349
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
350
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
351
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
352
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
354
Assert.Equal(listView.
Items
[0].SubItems[0].AccessibilityObject, accessibleObject1.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild));
355
Assert.Equal(listView.
Items
[1].SubItems[0].AccessibilityObject, accessibleObject2.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild));
356
Assert.Equal(listView.
Items
[2].SubItems[0].AccessibilityObject, accessibleObject3.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild));
357
Assert.Equal(listView.
Items
[3].SubItems[0].AccessibilityObject, accessibleObject4.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild));
381
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
382
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
384
Assert.Equal(listView.
Items
[0].SubItems[0].AccessibilityObject, accessibleObject1.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild));
385
Assert.Equal(listView.
Items
[1].SubItems[0].AccessibilityObject, accessibleObject2.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild));
395
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
396
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
397
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
398
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
416
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
417
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
418
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
419
AccessibleObject accessibleObject4 = listView.
Items
[3].AccessibilityObject;
434
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
435
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
437
Assert.Equal(listView.
Items
[0].SubItems[2].AccessibilityObject, accessibleObject1.FragmentNavigate(NavigateDirection.NavigateDirection_LastChild));
438
Assert.Equal(listView.
Items
[1].SubItems[2].AccessibilityObject, accessibleObject2.FragmentNavigate(NavigateDirection.NavigateDirection_LastChild));
448
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
449
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
455
Assert.NotEqual(listView.
Items
[0].SubItems[0].AccessibilityObject, lastChild1);
456
Assert.NotEqual(listView.
Items
[1].SubItems[0].AccessibilityObject, lastChild2);
466
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
467
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
471
Assert.Equal(listView.
Items
[0].SubItems[0].AccessibilityObject, lastChild1);
472
Assert.Equal(listView.
Items
[1].SubItems[0].AccessibilityObject, lastChild2);
482
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
483
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
489
Assert.Single(listView.
Items
[0].SubItems);
490
Assert.Single(listView.
Items
[1].SubItems);
492
listView.
Items
[0].SubItems.Add(new ListViewSubItem() { Text = $"SubItem 0" });
493
listView.
Items
[1].SubItems.Add(new ListViewSubItem() { Text = $"SubItem 0" });
498
Assert.Equal(listView.
Items
[0].SubItems[1].AccessibilityObject, lastChild1);
499
Assert.Equal(listView.
Items
[1].SubItems[1].AccessibilityObject, lastChild2);
500
Assert.Equal(2, listView.
Items
[0].SubItems.Count);
501
Assert.Equal(2, listView.
Items
[1].SubItems.Count);
511
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
512
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
516
Assert.Equal(listView.
Items
[0].SubItems[1].AccessibilityObject, lastChild1);
517
Assert.Equal(listView.
Items
[1].SubItems[1].AccessibilityObject, lastChild2);
518
Assert.Equal(2, listView.
Items
[0].SubItems.Count);
519
Assert.Equal(2, listView.
Items
[1].SubItems.Count);
521
listView.
Items
[0].SubItems.RemoveAt(1);
522
listView.
Items
[1].SubItems.RemoveAt(1);
529
Assert.Single(listView.
Items
[0].SubItems);
530
Assert.Single(listView.
Items
[1].SubItems);
656
listView.
Items
.Add(listItem1);
657
listView.
Items
[0].Selected = selected;
658
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
719
listView.
Items
[0].Selected = true;
722
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
755
Assert.NotEqual(Rectangle.Empty, listView.
Items
[0].AccessibilityObject.Bounds);
758
Assert.Equal(Rectangle.Empty, listView.
Items
[1].AccessibilityObject.Bounds);
762
Assert.NotEqual(Rectangle.Empty, listView.
Items
[1].AccessibilityObject.Bounds);
765
Assert.NotEqual(Rectangle.Empty, listView.
Items
[2].AccessibilityObject.Bounds);
776
Assert.Equal(Rectangle.Empty, listView.
Items
[0].AccessibilityObject.Bounds);
777
Assert.Equal(Rectangle.Empty, listView.
Items
[1].AccessibilityObject.Bounds);
778
Assert.Equal(Rectangle.Empty, listView.
Items
[2].AccessibilityObject.Bounds);
800
listView.
Items
.Add(listViewItem);
989
listView.
Items
.Add(listView.Groups[0].Items[0]);
990
listView.
Items
.Add(listView.Groups[0].Items[3]);
1019
listView.
Items
.RemoveAt(1);
1041
Assert.Equal(expectedCount, listView.
Items
[0].AccessibilityObject.GetChildCount());
1042
Assert.Equal(expectedCount, listView.
Items
[1].AccessibilityObject.GetChildCount());
1051
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
1052
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
1058
Assert.Equal(listView.
Items
[0].SubItems[0].AccessibilityObject, accessibleObject1.GetChild(0));
1059
Assert.Equal(listView.
Items
[0].SubItems[1].AccessibilityObject, accessibleObject1.GetChild(1));
1064
Assert.Equal(listView.
Items
[1].SubItems[0].AccessibilityObject, accessibleObject2.GetChild(0));
1065
Assert.Equal(listView.
Items
[1].SubItems[1].AccessibilityObject, accessibleObject2.GetChild(1));
1091
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
1092
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
1098
Assert.Equal(listView.
Items
[0].SubItems[0].AccessibilityObject, accessibleObject1.GetChild(0));
1099
Assert.Equal(listView.
Items
[0].SubItems[1].AccessibilityObject, accessibleObject1.GetChild(1));
1100
Assert.Equal(listView.
Items
[0].SubItems[2].AccessibilityObject, accessibleObject1.GetChild(2));
1102
Assert.Equal(listView.
Items
[1].SubItems[0].AccessibilityObject, accessibleObject2.GetChild(0));
1103
Assert.Equal(listView.
Items
[1].SubItems[1].AccessibilityObject, accessibleObject2.GetChild(1));
1104
Assert.Equal(listView.
Items
[1].SubItems[2].AccessibilityObject, accessibleObject2.GetChild(2));
1176
listView.
Items
.AddRange((ListViewItem[])[listItem1, listItem2]);
1238
listView.
Items
.Add(listItem1);
1239
listView.
Items
.Add(listItem2);
1240
listView.
Items
.Add(listItem3);
1241
listView.
Items
.Add(listItem4);
1263
listView.
Items
.AddRange((ListViewItem[])[listViewVisibleItem1, listViewVisibleItem2]);
1291
listView.
Items
.Add(new ListViewItem("Item 1"));
1292
listView.
Items
.Add(new ListViewItem("Item 2"));
1293
listView.
Items
.Add(new ListViewItem("Item 3"));
1298
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
1299
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
1300
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
1315
listView.
Items
[1].Group = listView.Groups[0];
1350
listView.
Items
.Add(new ListViewItem("Item 1"));
1351
listView.
Items
.Add(new ListViewItem("Item 2", group: listView.Groups[0]));
1352
listView.
Items
.Add(new ListViewItem("Item 3"));
1357
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
1358
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
1359
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
1408
listView.
Items
.Add(new ListViewItem("Item 1"));
1409
listView.
Items
.Add(new ListViewItem("Item 2", group: listView.Groups[0]));
1410
listView.
Items
.Add(new ListViewItem("Item 3"));
1415
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
1416
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
1417
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
1431
listView.Groups[0].Items.Insert(0, listView.
Items
[0]);
1455
listView.
Items
.Add(new ListViewItem("Item 1"));
1456
listView.
Items
.Add(new ListViewItem("Item 2"));
1457
listView.
Items
.Add(new ListViewItem("Item 3"));
1462
AccessibleObject accessibleObject1 = listView.
Items
[0].AccessibilityObject;
1463
AccessibleObject accessibleObject2 = listView.
Items
[1].AccessibilityObject;
1464
AccessibleObject accessibleObject3 = listView.
Items
[2].AccessibilityObject;
1481
listView.
Items
[1].Group = listView.Groups[0];
1497
listView.Groups[0].Items.Insert(0, listView.
Items
[0]);
1537
listView.
Items
.Add(new ListViewItem(["Item 1", "SubItem 1", "SubItem 2"]));
1540
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
1544
Assert.Equal(0, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[0].AccessibilityObject));
1545
Assert.Equal(1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[1].AccessibilityObject));
1546
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[2].AccessibilityObject));
1550
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[0].AccessibilityObject));
1551
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[1].AccessibilityObject));
1552
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[2].AccessibilityObject));
1567
listView.
Items
.Add(new ListViewItem(["Item 1", "SubItem 1", "SubItem 2"]));
1569
Assert.Equal(-1, listView.
Items
[0].AccessibilityObject.GetChildIndex(null));
1585
listView.
Items
.Add(new ListViewItem(["Item 1", "SubItem 11", "SubItem 12"]));
1586
listView.
Items
.Add(new ListViewItem(["Item 2", "SubItem 21", "SubItem 22"]));
1588
Assert.Equal(-1, listView.
Items
[0].AccessibilityObject.GetChildIndex(listView.
Items
[1].SubItems[1].AccessibilityObject));
1600
listView.
Items
.Add(new ListViewItem(["Item 1"]));
1601
ListViewItemDetailsAccessibleObject accessibleObject = (ListViewItemDetailsAccessibleObject)listView.
Items
[0].AccessibilityObject;
1603
Assert.Equal(0, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[0].AccessibilityObject));
1625
listView.
Items
.Add(listViewItem);
1626
var accessibleObject = (ListViewItemDetailsAccessibleObject)listView.
Items
[0].AccessibilityObject;
1628
Assert.Equal(expectedFirstSubItemIndex, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[0].AccessibilityObject));
1644
listView.
Items
.Add(new ListViewItem(["Item 1", "SubItem 11", "SubItem 12"]));
1646
Assert.Equal(-1, listView.
Items
[0].AccessibilityObject.GetChildIndex(listView.AccessibilityObject));
1659
listView.
Items
.Add(new ListViewItem("Test"));
1664
Assert.IsType<ListViewItemDetailsAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1667
Assert.IsType<ListViewItemLargeIconAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1670
Assert.IsType<ListViewItemListAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1673
Assert.IsType<ListViewItemSmallIconAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1676
Assert.IsType<ListViewItemTileAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1700
listView.
Items
.Add(new ListViewItem("Test"));
1712
Assert.IsType<ListViewItemDetailsAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1715
Assert.IsType<ListViewItemLargeIconAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1718
Assert.IsType<ListViewItemListAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1721
Assert.IsType<ListViewItemSmallIconAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1724
Assert.IsType<ListViewItemTileAccessibleObject>(listView.
Items
[0].AccessibilityObject);
1754
listView.
Items
.Add(new ListViewItem(["1", "2"]));
1755
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
1787
listView.
Items
.Add(new ListViewItem(["1"]));
1788
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
1833
ListViewItemBaseAccessibleObject accessibleObject = (ListViewItemBaseAccessibleObject)listView.
Items
[0].AccessibilityObject;
1835
bool expected = listView.GroupsDisplayed && listView.
Items
[0].Group?.CollapsedState == ListViewGroupCollapsedState.Collapsed;
1847
listView.
Items
.Add(item);
1861
listView.
Items
.Add(item);
1875
listView.
Items
.Add(item);
1878
listView.
Items
.Clear();
1889
listView.
Items
.Add(item);
1892
listView.
Items
.Remove(item);
1903
listView.
Items
.Add(item);
1906
listView.
Items
[0] = new ListViewItem();
1972
listView.
Items
.Add(listViewItem1);
1973
listView.
Items
.Add(listViewItem2);
1974
listView.
Items
.Add(listViewItem3);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemBaseAccessibleObjectTests.cs (28)
24
control.
Items
.Add(item);
35
control.
Items
.Add(item);
46
control.
Items
.Add(item);
59
control.
Items
.Add(item);
71
control.
Items
.Add(item);
82
control.
Items
.Add(item);
99
control.
Items
.Add(item);
117
control.
Items
.Add(item);
134
control.
Items
.Add(item);
152
control.
Items
.Add(item);
165
control.
Items
.AddRange((ListViewItem[])[new(), new(), new()]);
167
AccessibleObject accessibleObject1 = control.
Items
[0].AccessibilityObject;
168
AccessibleObject accessibleObject2 = control.
Items
[1].AccessibilityObject;
182
control.
Items
.Add(item);
201
control.
Items
.Add(item);
219
control.
Items
.Add(item);
232
control.
Items
.Add(item);
245
control.
Items
.Add(item);
258
control.
Items
.Add(item);
271
control.
Items
.Add(item);
287
listView.
Items
.Add(item);
303
listView.
Items
.Add(item);
322
listView.
Items
.Add(item);
340
control.
Items
.Add(item);
351
control.
Items
.Add(item);
364
control.
Items
.Add(item);
377
control.
Items
.Add(item);
394
listView.
Items
.Add(item);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (10)
24
control.
Items
.Add(item);
38
control.
Items
.Add(item);
56
control.
Items
.Add(item);
70
control.
Items
.Add(item);
88
control.
Items
.Add(item);
101
control.
Items
.Add(item);
116
control.
Items
.Add(item);
152
listView.
Items
.Add(listViewItem);
154
var accessibleObject = (ListViewItemDetailsAccessibleObject)listView.
Items
[0].AccessibilityObject;
170
listView1.
Items
.AddRange((ListViewItem[])[listViewItem1, listViewItem2]);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemImageAccessibleObjectTests.cs (2)
25
list.
Items
.Add(listViewItem);
51
list.
Items
.Add(listViewItem);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemListAccessibleObjectTests.cs (12)
29
control.
Items
.Add(new ListViewItem());
31
Assert.Equal(Rectangle.Empty, control.
Items
[0].AccessibilityObject.Bounds);
40
control.
Items
.Add(new ListViewItem());
41
AccessibleObject accessibleObject1 = control.
Items
[0].AccessibilityObject;
52
control.
Items
.AddRange((ListViewItem[])[new(), new(), new()]);
55
AccessibleObject accessibleObject1 = control.
Items
[0].AccessibilityObject;
56
AccessibleObject accessibleObject2 = control.
Items
[1].AccessibilityObject;
57
AccessibleObject accessibleObject3 = control.
Items
[2].AccessibilityObject;
71
control.
Items
.AddRange((ListViewItem[])[new(), new(), new()]);
74
AccessibleObject accessibleObject1 = control.
Items
[0].AccessibilityObject;
75
AccessibleObject accessibleObject2 = control.
Items
[1].AccessibilityObject;
76
AccessibleObject accessibleObject3 = control.
Items
[2].AccessibilityObject;
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemWithImageAccessibleObjectTests.cs (12)
17
control.
Items
.Add(new ListViewItem());
19
AccessibleObject listViewItemAccessibleObject = control.
Items
[0].AccessibilityObject;
45
control.
Items
.Add(listViewItem);
47
AccessibleObject listViewItemAccessibleObject = control.
Items
[0].AccessibilityObject;
63
control.
Items
.Add(new ListViewItem());
65
AccessibleObject listViewItemAccessibleObject = control.
Items
[0].AccessibilityObject;
85
control.
Items
.Add(listViewItem);
87
AccessibleObject listViewItemAccessibleObject = control.
Items
[0].AccessibilityObject;
99
control.
Items
.Add(new ListViewItem());
102
AccessibleObject listViewItemAccessibleObject = control.
Items
[0].AccessibilityObject;
122
control.
Items
.Add(listViewItem);
125
AccessibleObject listViewItemAccessibleObject = control.
Items
[0].AccessibilityObject;
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (72)
35
list.
Items
.Add(listViewItem1);
72
list.
Items
.Add(listViewItem1);
104
list.
Items
.Add(new ListViewItem(["Test 1", "Test 2"]));
106
AccessibleObject accessibleObject = list.
Items
[0].SubItems[1].AccessibilityObject;
140
ListViewItem listViewItem = listView.
Items
[0];
141
ListViewItem listViewItemInGroup = listView.
Items
[1];
187
ListViewItem listViewItem = listView.
Items
[0];
188
ListViewItem listViewItemInGroup = listView.
Items
[1];
217
ListViewItem listViewItem = listView.
Items
[0];
218
ListViewItem listViewItemInGroup = listView.
Items
[1];
247
ListViewItem listViewItem = listView.
Items
[0];
248
ListViewItem listViewItemInGroup = listView.
Items
[1];
288
ListViewItem listViewItem = listView.
Items
[0];
289
ListViewItem listViewItemInGroup = listView.
Items
[1];
324
ListViewItem listViewItem = listView.
Items
[0];
325
ListViewItem listViewItemInGroup = listView.
Items
[1];
357
ListViewItem listViewItem = listView.
Items
[0];
358
ListViewItem listViewItemInGroup = listView.
Items
[1];
383
ListViewItem listViewItem = listView.
Items
[0];
384
ListViewItem listViewItemInGroup = listView.
Items
[1];
409
ListViewItem listViewItem = listView.
Items
[0];
410
ListViewItem listViewItemInGroup = listView.
Items
[1];
428
ListViewItem listViewItem = listView.
Items
[0];
429
ListViewItem listViewItemInGroup = listView.
Items
[1];
462
ListViewItem listViewItem = listView.
Items
[0];
463
ListViewItem listViewItemInGroup = listView.
Items
[1];
485
ListViewItem listViewItem = listView.
Items
[0];
486
ListViewItem listViewItemInGroup = listView.
Items
[1];
508
ListViewItem listViewItem = listView.
Items
[0];
509
ListViewItem listViewItemInGroup = listView.
Items
[1];
531
ListViewItem listViewItem = listView.
Items
[0];
532
ListViewItem listViewItemInGroup = listView.
Items
[1];
554
ListViewItem listViewItem = listView.
Items
[0];
555
ListViewItem listViewItemInGroup = listView.
Items
[1];
575
Assert.Same(listView.
Items
[0].SubItems[0].AccessibilityObject, previousSubItemAccObj1);
592
ListViewItem listViewItem = listView.
Items
[0];
593
ListViewItem listViewItemInGroup = listView.
Items
[1];
595
AccessibleObject subItemAccObj = listView.
Items
[0].SubItems[0].AccessibilityObject;
647
list.
Items
.Add(listViewItem1);
694
list.
Items
.Add(listViewItem1);
735
list.
Items
.Add(listViewItem1);
771
list.
Items
.Add(listViewItem1);
840
listView.
Items
.AddRange((ListViewItem[])[listItem1, listItem2]);
878
listView.
Items
.Add(new ListViewItem("Test item 11"));
879
listView.
Items
[0].SubItems.Add("Test item 12");
881
var itemAccessibleObject = listView.
Items
[0].AccessibilityObject;
882
var subItemAccessibleObject = listView.
Items
[0].SubItems[0].AccessibilityObject;
900
listView.
Items
.Add(new ListViewItem("Test item 11"));
901
listView.
Items
[0].SubItems.Add("Test item 12");
903
var itemAccessibleObject = listView.
Items
[0].AccessibilityObject;
904
var subItemAccessibleObject = listView.
Items
[0].SubItems[0].AccessibilityObject;
915
listView.
Items
.Add(listViewItem);
928
listView.
Items
.Add(listViewItem);
943
listView.
Items
.Add(listViewItem);
972
listView.
Items
.Add(listViewItem);
1007
control.
Items
[0].ImageIndex = 0;
1017
var subItemAccessibleObject = (ListViewSubItemAccessibleObject)control.
Items
[0].SubItems[i].AccessibilityObject;
1041
var subItemAccessibleObject = (ListViewSubItemAccessibleObject)control.
Items
[0].SubItems[1].AccessibilityObject;
1053
listview.
Items
.Add(listViewItem);
1065
listView.
Items
.Add(listViewItem);
1081
listView.
Items
.Add(listViewItem);
1097
listView.
Items
.Add(listViewItem);
1100
listView.
Items
.RemoveAt(0);
1113
listView.
Items
.Add(listViewItem);
1116
listView.
Items
[0].SubItems.Remove(listViewSubItem);
1129
listView.
Items
.Add(listViewItem);
1132
listView.
Items
[0].SubItems.Clear();
1145
listView.
Items
.Add(listViewItem);
1148
listView.
Items
[0] = new ListViewItem();
1161
listView.
Items
.Add(listViewItem);
1164
int subItemIndex = listView.
Items
[0].SubItems.IndexOf(listViewSubItem);
1165
listView.
Items
[0].SubItems[subItemIndex] = new ListViewItem.ListViewSubItem();
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (2)
116
Assert.Equal(listView.
Items
[0].Text, accessibilityObject.Name);
166
listView.
Items
.Add(item);
System\Windows\Forms\ControlTests.cs (1)
1054
listView1.
Items
.AddRange((ListViewItem[])[new("Foo"), new("Foo"), new("Foo")]);
System\Windows\Forms\DrawListViewItemEventArgsTests.cs (3)
86
listView.
Items
.Add(listViewItem);
93
listView.
Items
.Add(subItemsItem);
101
fullRowSelectListView.
Items
.Add(fullRowSelectListViewItem);
System\Windows\Forms\ListView.ListViewItemCollectionTests.cs (3)
41
ListView.ListViewItemCollection collection = listView.
Items
;
83
var collection = listView.
Items
;
97
var collection = listView.
Items
;
System\Windows\Forms\ListViewGroupCollectionTests.cs (9)
84
listView.
Items
.Add(item);
105
listView.
Items
.Add(item);
162
otherListView.
Items
.Add(item);
413
listView.
Items
.Add(item);
432
listView.
Items
.Add(item);
493
otherListView.
Items
.Add(item);
774
listView.
Items
.Add(item);
793
listView.
Items
.Add(item);
849
otherListView.
Items
.Add(item);
System\Windows\Forms\ListViewGroupConverterTests.cs (9)
34
listView.
Items
.Add(item1);
41
listViewWithGroups.
Items
.Add(item2);
75
listView.
Items
.Add(item);
93
listView.
Items
.Add(item1);
99
listViewWithGroups.
Items
.Add(item2);
147
listView.
Items
.Add(item1);
154
listViewWithGroups.
Items
.Add(item2);
263
listView.
Items
.Add(item1);
270
listViewWithGroups.
Items
.Add(item2);
System\Windows\Forms\ListViewGroupTests.cs (2)
1434
listView.
Items
.Add(listViewItem);
1449
listView.
Items
.Add(listViewItem);
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (81)
127
listView.
Items
.Add(listViewItem);
246
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[0]).GetNeighboringToolsRectangles();
248
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[1]), neighboringToolsRectangles);
249
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[3]), neighboringToolsRectangles);
264
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[1]).GetNeighboringToolsRectangles();
266
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[0]), neighboringToolsRectangles);
267
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[2]), neighboringToolsRectangles);
268
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[4]), neighboringToolsRectangles);
283
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[2]).GetNeighboringToolsRectangles();
285
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[1]), neighboringToolsRectangles);
286
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[5]), neighboringToolsRectangles);
301
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[3]).GetNeighboringToolsRectangles();
303
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[0]), neighboringToolsRectangles);
304
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[4]), neighboringToolsRectangles);
305
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[6]), neighboringToolsRectangles);
320
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[4]).GetNeighboringToolsRectangles();
322
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[1]), neighboringToolsRectangles);
323
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[3]), neighboringToolsRectangles);
324
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[5]), neighboringToolsRectangles);
325
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[7]), neighboringToolsRectangles);
340
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[5]).GetNeighboringToolsRectangles();
342
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[2]), neighboringToolsRectangles);
343
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[4]), neighboringToolsRectangles);
344
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[8]), neighboringToolsRectangles);
359
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[6]).GetNeighboringToolsRectangles();
361
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[3]), neighboringToolsRectangles);
362
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[7]), neighboringToolsRectangles);
377
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[7]).GetNeighboringToolsRectangles();
379
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[6]), neighboringToolsRectangles);
380
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[8]), neighboringToolsRectangles);
381
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[4]), neighboringToolsRectangles);
396
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[8]).GetNeighboringToolsRectangles();
398
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[5]), neighboringToolsRectangles);
399
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[7]), neighboringToolsRectangles);
415
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[0]).GetNeighboringToolsRectangles();
417
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[1]), neighboringToolsRectangles);
418
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[3]), neighboringToolsRectangles);
434
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[1]).GetNeighboringToolsRectangles();
437
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[0]), neighboringToolsRectangles);
438
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[2]), neighboringToolsRectangles);
439
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[4]), neighboringToolsRectangles);
455
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[2]).GetNeighboringToolsRectangles();
458
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[1]), neighboringToolsRectangles);
459
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[5]), neighboringToolsRectangles);
475
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[3]).GetNeighboringToolsRectangles();
478
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[0]), neighboringToolsRectangles);
479
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[4]), neighboringToolsRectangles);
480
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[6]), neighboringToolsRectangles);
496
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[4]).GetNeighboringToolsRectangles();
499
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[1]), neighboringToolsRectangles);
500
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[3]), neighboringToolsRectangles);
501
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[5]), neighboringToolsRectangles);
502
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[7]), neighboringToolsRectangles);
518
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[5]).GetNeighboringToolsRectangles();
521
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[2]), neighboringToolsRectangles);
522
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[4]), neighboringToolsRectangles);
523
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[8]), neighboringToolsRectangles);
539
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[6]).GetNeighboringToolsRectangles();
542
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[3]), neighboringToolsRectangles);
543
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[7]), neighboringToolsRectangles);
559
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[7]).GetNeighboringToolsRectangles();
561
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[6]), neighboringToolsRectangles);
562
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[8]), neighboringToolsRectangles);
563
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[4]), neighboringToolsRectangles);
579
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[8]).GetNeighboringToolsRectangles();
581
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[5]), neighboringToolsRectangles);
582
Assert.Contains(GetNativeScreenRectangle(listView.
Items
[7]), neighboringToolsRectangles);
595
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[0]).GetNeighboringToolsRectangles();
598
Assert.Contains(listView.
Items
[0].AccessibilityObject.Bounds, neighboringToolsRectangles);
599
Assert.Contains(listView.
Items
[1].AccessibilityObject.Bounds, neighboringToolsRectangles);
612
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[1]).GetNeighboringToolsRectangles();
615
Assert.Contains(listView.
Items
[0].AccessibilityObject.Bounds, neighboringToolsRectangles);
616
Assert.Contains(listView.
Items
[1].AccessibilityObject.Bounds, neighboringToolsRectangles);
617
Assert.Contains(listView.
Items
[2].AccessibilityObject.Bounds, neighboringToolsRectangles);
630
IList<Rectangle> neighboringToolsRectangles = ((IKeyboardToolTip)listView.
Items
[2]).GetNeighboringToolsRectangles();
633
Assert.Contains(listView.
Items
[1].AccessibilityObject.Bounds, neighboringToolsRectangles);
634
Assert.Contains(listView.
Items
[2].AccessibilityObject.Bounds, neighboringToolsRectangles);
763
listView.
Items
.Add(listViewItem);
766
return listView.
Items
[0];
773
listView.
Items
.Add(i.ToString());
800
listView.
Items
.AddRange((ListViewItem[])[.. listViewItems]);
System\Windows\Forms\ListViewItemTests.cs (17)
863
listView.
Items
.Add(item);
867
listView.
Items
.Remove(item);
892
listView.
Items
.Add(item);
920
listView.
Items
.Add(item);
924
listView.
Items
.Remove(item);
950
listView.
Items
.Add(item);
970
listView.
Items
.Add(item);
974
listView.
Items
.Remove(item);
1004
listView.
Items
.Add(item);
1019
listView.
Items
.Add(item);
1035
listView.
Items
.Add(item);
1037
Assert.Empty(listView.
Items
);
1084
listView.
Items
.Add(item);
1094
listView.
Items
.Add(item);
1098
listView.
Items
.RemoveAt(0);
1108
listView.
Items
.Add(item);
1112
listView.
Items
.Clear();
System\Windows\Forms\ListViewSubItemTests.cs (13)
86
listView.
Items
.Add(item);
92
listView.
Items
.Remove(item);
122
listView.
Items
.Add(item);
171
listView.
Items
.Add(item);
207
listView.
Items
.Add(item);
222
listView.
Items
.Add(item);
228
listView.
Items
.Remove(item);
258
listView.
Items
.Add(item);
296
listView.
Items
.Add(item);
335
listView.
Items
.Add(item);
341
listView.
Items
.Remove(item);
371
listView.
Items
.Add(item);
422
listView.
Items
.Add(item);
System\Windows\Forms\ListViewTests.cs (146)
99
Assert.Empty(control.
Items
);
100
Assert.Same(control.
Items
, control.
Items
);
876
listView.
Items
.Add(item1);
877
listView.
Items
.Add(item2);
878
Assert.Equal(new ListViewItem[] { item1, item2 }, listView.
Items
.Cast<ListViewItem>());
1049
listView.
Items
.Add(item1);
1050
listView.
Items
.Add(item2);
1051
Assert.Equal(new ListViewItem[] { item1, item2 }, listView.
Items
.Cast<ListViewItem>());
1246
control.
Items
.Add(value);
1288
control.
Items
.Add(value);
4086
control.
Items
.Add(item1);
4087
control.
Items
.Add(item2);
4110
control.
Items
.Add(item1);
4111
control.
Items
.Add(item2);
4156
control.
Items
.Add(item);
4185
control.
Items
.Add(item);
4224
control.
Items
.Add(item1);
4245
control.
Items
.Add(item1);
4332
listView.
Items
.Add(testItem);
4340
listView.
Items
[0].Focused = focused;
4341
listView.
Items
[0].Selected = selected;
4403
listView.
Items
[0].Focused = focused;
4404
listView.
Items
[0].Selected = selected;
4433
listView.
Items
[0].Focused = true;
4435
var clone = (ListViewItem)listView.
Items
[0].Clone();
4481
control.
Items
.Add(new ListViewItem());
4482
control.
Items
.Add(new ListViewItem());
4510
control.
Items
.Add(item1);
4511
control.
Items
.Add(item2);
4582
control.
Items
.Add(item1);
4583
control.
Items
.Add(item2);
4584
control.
Items
.Add(item3);
4597
Assert.True(control.
Items
.Count > 0);
4734
listView.
Items
.Add(listItem);
4742
listView.
Items
[0].Selected = true;
4811
listView.
Items
.Add(listItem);
4823
listView.
Items
[0].Focused = focused;
4868
listView.
Items
.Add(listViewItem);
4885
listView.
Items
.AddRange((ListViewItem[])[listViewItem1, listViewItem2, listViewItem3]);
4900
listView.
Items
.Insert(0, listViewItem);
4914
listView.
Items
.Add(listViewItem);
4918
listView.
Items
.Remove(listViewItem);
4931
listView.
Items
.Add(listViewItem);
4963
listView.
Items
.Add(listViewItem);
5034
listView.
Items
.AddRange(listItems);
5090
listView.
Items
.AddRange(listItems);
5150
listView.
Items
.Add(new ListViewItem("Test"));
5175
listView.
Items
.Add(new ListViewItem("Test"));
5200
listView.
Items
.Add(new ListViewItem("Test"));
5227
listView.
Items
.Add(new ListViewItem("Test"));
5293
listView.
Items
.GetItemByIndex(0).Should().Be(listView.
Items
[0]);
5294
listView.
Items
.GetItemByIndex(1).Should().BeNull();
5295
Action action = () => listView.
Items
[1].ToString();
5345
ListViewItem listViewItem = listView.
Items
[0];
5439
listView.
Items
.Add(item);
5444
listView.
Items
[0].Selected = true;
5447
Point subItemLocation = listView.
Items
[0].SubItems[subItemIndex].Bounds.Location + new Size(1, 1);
5478
listView.
Items
.Add(new ListViewItem("Group Item 0"));
5480
listView.
Items
[0].Selected = true;
5481
listView.
Items
[0].Focused = true;
5528
listView.
Items
.AddRange((ListViewItem[])[new("test 1"), new("test 2"), new("test 3")]);
5530
listView.
Items
[0].Selected = true;
5532
Assert.True(listView.
Items
[0].Selected);
5533
Assert.Equal(3, listView.
Items
.Count);
5537
listView.
Items
.Remove(listView.
Items
[1]);
5539
Assert.True(listView.
Items
[0].Selected);
5540
Assert.Equal(2, listView.
Items
.Count);
5543
Assert.True(listView.
Items
[0].Selected);
5545
listView.
Items
.Remove(listView.
Items
[1]);
5547
Assert.True(listView.
Items
[0].Selected);
5548
Assert.Single(listView.
Items
);
5551
Assert.True(listView.
Items
[0].Selected);
5560
listView.
Items
.AddRange((ListViewItem[])[new("test 1"), new("test 2"), new("test 3")]);
5562
for (int count = listView.
Items
.Count; count > 1; count -= 1)
5564
ListViewItem item = listView.
Items
[0];
5568
Assert.Equal(count, listView.
Items
.Count);
5573
listView.
Items
.Remove(item);
5577
Assert.Equal(count, listView.
Items
.Count);
5590
listView.
Items
.AddRange((ListViewItem[])[new("test 1"), new("test 2"), new("test 3")]);
5592
listView.
Items
[0].Checked = true;
5594
Assert.True(listView.
Items
[0].Checked);
5595
Assert.Equal(3, listView.
Items
.Count);
5599
listView.
Items
.Remove(listView.
Items
[1]);
5601
Assert.True(listView.
Items
[0].Checked);
5602
Assert.Equal(2, listView.
Items
.Count);
5606
listView.
Items
.Remove(listView.
Items
[1]);
5608
Assert.True(listView.
Items
[0].Checked);
5609
Assert.Single(listView.
Items
);
5620
listView.
Items
.AddRange((ListViewItem[])[new("test 1"), new("test 2"), new("test 3")]);
5622
for (int count = listView.
Items
.Count; count > 1; count -= 1)
5624
ListViewItem item = listView.
Items
[0];
5628
Assert.Equal(count, listView.
Items
.Count);
5633
listView.
Items
.Remove(item);
5637
Assert.Equal(count, listView.
Items
.Count);
5653
listView.
Items
.AddRange((ListViewItem[])[new("test 1", groups[0]), new("test 2", groups[1]), new("test 3", groups[2])]);
5655
listView.
Items
[0].Selected = true;
5657
Assert.True(listView.
Items
[0].Selected);
5658
Assert.Equal(3, listView.
Items
.Count);
5665
Assert.True(listView.
Items
[0].Selected);
5666
Assert.Equal(3, listView.
Items
.Count);
5670
Assert.True(listView.
Items
[0].Selected);
5674
Assert.True(listView.
Items
[0].Selected);
5675
Assert.Equal(3, listView.
Items
.Count);
5679
Assert.True(listView.
Items
[0].Selected);
5691
listView.
Items
.AddRange((ListViewItem[])[new("test 1", groups[0]), new("test 2", groups[1]), new("test 3", groups[2])]);
5696
ListViewItem item = listView.
Items
[i];
5701
Assert.Equal(3, listView.
Items
.Count);
5711
Assert.Equal(3, listView.
Items
.Count);
5728
listView.
Items
.AddRange((ListViewItem[])[new("test 1", groups[0]), new("test 2", groups[1]), new("test 3", groups[2])]);
5730
listView.
Items
[0].Checked = true;
5732
Assert.True(listView.
Items
[0].Checked);
5733
Assert.Equal(3, listView.
Items
.Count);
5734
Assert.Equal(3, listView.
Items
.Count);
5740
Assert.True(listView.
Items
[0].Checked);
5741
Assert.Equal(3, listView.
Items
.Count);
5748
Assert.True(listView.
Items
[0].Checked);
5749
Assert.Equal(3, listView.
Items
.Count);
5764
listView.
Items
.AddRange((ListViewItem[])[new("test 1", groups[0]), new("test 2", groups[1]), new("test 3", groups[2])]);
5769
ListViewItem item = listView.
Items
[i];
5774
Assert.Equal(3, listView.
Items
.Count);
5784
Assert.Equal(3, listView.
Items
.Count);
5797
listView.
Items
.Add(new ListViewItem("Test 1"));
5798
listView.
Items
.Add(new ListViewItem("Test 2"));
5799
listView.
Items
[0].Focused = true;
5803
listView.
Items
.Remove(listView.
Items
[0]);
5813
listView.
Items
.Add(new ListViewItem("Test 1"));
5814
listView.
Items
.Add(new ListViewItem("Test 2"));
5815
listView.
Items
[0].Focused = true;
5819
listView.
Items
.RemoveAt(0);
5829
listView.
Items
.Add(new ListViewItem("Test 1") { Name = "Test 1" });
5830
listView.
Items
.Add(new ListViewItem("Test 2"));
5831
listView.
Items
[0].Focused = true;
5835
listView.
Items
.RemoveByKey("Test 1");
5845
listView.
Items
.Add(new ListViewItem("Test 1"));
5846
listView.
Items
.Add(new ListViewItem("Test 2"));
5847
listView.
Items
[0].Focused = true;
5851
listView.
Items
.Clear();
6213
listView.
Items
.Add(listItem1);
6214
listView.
Items
.Add(listItem2);
System.Windows.Forms.UI.IntegrationTests (68)
ListViewTests.cs (68)
32
Point itemCenter = GetCenter(listView.RectangleToScreen(listView.
Items
[0].Bounds));
38
Assert.Equal(listView.
Items
[0].Checked, expected);
56
listView.
Items
.AddRange(item1, item2, item3);
127
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
129
AccessibleObject? expectedAccessibleObject = listView.
Items
[itemIndex].SubItems[subItemIndex].AccessibilityObject;
150
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
167
AccessibleObject? accessibleObject = listView.
Items
[0].SubItems[1].AccessibilityObject;
194
Assert.Equal(expected, listView.
Items
[0].AccessibilityObject.GetChildCount());
210
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
213
Assert.Equal(listView.
Items
[0].SubItems[1].AccessibilityObject, accessibleObject.GetChild(0));
230
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
250
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
252
Assert.Equal(expected1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[0].AccessibilityObject));
253
Assert.Equal(expected2, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[1].AccessibilityObject));
267
AccessibleObject? accessibleObject1 = listView.
Items
[0].SubItems[1].AccessibilityObject;
272
Assert.Equal(listView.
Items
[0].SubItems[2].AccessibilityObject, accessibleObject2);
273
Assert.Equal(listView.
Items
[0].SubItems[3].AccessibilityObject, accessibleObject3);
289
AccessibleObject? expectedAccessibleItem1 = listView.
Items
[0].SubItems[1].AccessibilityObject;
290
AccessibleObject? expectedAccessibleItem2 = listView.
Items
[0].SubItems[2].AccessibilityObject;
313
AccessibleObject? accessibleObject = listView.
Items
[0].SubItems[1].AccessibilityObject;
332
AccessibleObject accessibleObject = (AccessibleObject)listView.
Items
[0].AccessibilityObject.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild)!;
349
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
352
Assert.Equal(listView.
Items
[0].SubItems[1].AccessibilityObject, accessibleObject.GetChild(0));
353
Assert.Equal(listView.
Items
[0].SubItems[2].AccessibilityObject, accessibleObject.GetChild(1));
354
Assert.Equal(listView.
Items
[0].SubItems[3].AccessibilityObject, accessibleObject.GetChild(2));
369
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
372
Assert.Equal(listView.
Items
[0].SubItems[1].AccessibilityObject, accessibleObject.GetChild(0));
373
Assert.Equal(listView.
Items
[0].SubItems[2].AccessibilityObject, accessibleObject.GetChild(1));
374
Assert.Equal(listView.
Items
[0].SubItems[3].AccessibilityObject, accessibleObject.GetChild(2));
375
Assert.Equal(listView.
Items
[0].SubItems[4].AccessibilityObject, accessibleObject.GetChild(3));
376
Assert.Equal(listView.
Items
[0].SubItems[5].AccessibilityObject, accessibleObject.GetChild(4));
391
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
393
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[0].AccessibilityObject));
394
Assert.Equal(1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[1].AccessibilityObject));
395
Assert.Equal(2, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[2].AccessibilityObject));
396
Assert.Equal(3, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[3].AccessibilityObject));
410
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
412
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[0].AccessibilityObject));
413
Assert.Equal(1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[1].AccessibilityObject));
414
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[2].AccessibilityObject));
415
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[3].AccessibilityObject));
416
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[4].AccessibilityObject));
429
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
431
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[0].AccessibilityObject));
432
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[1].AccessibilityObject));
433
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[2].AccessibilityObject));
447
AccessibleObject accessibleObject = listView.
Items
[0].AccessibilityObject;
449
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[0].AccessibilityObject));
450
Assert.Equal(1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[1].AccessibilityObject));
451
Assert.Equal(2, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[2].AccessibilityObject));
452
Assert.Equal(3, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[3].AccessibilityObject));
453
Assert.Equal(4, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[4].AccessibilityObject));
454
Assert.Equal(5, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[5].AccessibilityObject));
455
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[6].AccessibilityObject));
456
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[7].AccessibilityObject));
457
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[8].AccessibilityObject));
458
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[9].AccessibilityObject));
459
Assert.Equal(-1, accessibleObject.GetChildIndex(listView.
Items
[0].SubItems[10].AccessibilityObject));
472
Assert.Equal(listView.
Items
[0].SubItems[0].AccessibilityObject?.Column, -1);
473
Assert.Equal(listView.
Items
[0].SubItems[1].AccessibilityObject?.Column, -1);
474
Assert.Equal(listView.
Items
[0].SubItems[2].AccessibilityObject?.Column, -1);
475
Assert.Equal(listView.
Items
[0].SubItems[2].AccessibilityObject?.Column, -1);
488
foreach (ListViewItem item in listView.
Items
)
494
Point listViewCenter = GetCenter(listView.RectangleToScreen(listView.
Items
[0].SubItems[1].Bounds));
500
listViewCenter = GetCenter(listView.RectangleToScreen(listView.
Items
[2].SubItems[1].Bounds));
507
foreach (ListViewItem item in listView.
Items
)
542
listView.
Items
.AddRange(listViewItem1, listViewItem2, listViewItem3);
562
listView.
Items
.Add(listViewItem);
TrimTestBinaryDeserialization (1)
Form1.Designer.cs (1)
47
listView1.
Items
.AddRange(new ListViewItem[] { listViewItem1 });
WinFormsControlsTest (9)
CollectionEditors.cs (1)
34
_stringList.ForEach(s => listView1.
Items
.Add(s));
ListViewTest.cs (7)
22
listView1.
Items
[0].ImageIndex = 0;
23
listView1.
Items
[1].ImageIndex = 1;
24
listView1.
Items
[2].ImageIndex = 2;
153
listView1.
Items
.Add(new ListViewItem
166
listView1.
Items
.Add(new ListViewItem
193
listView1.
Items
.Add(new ListViewItem
259
listView1.
Items
.Add(item);
ListViewTest.Designer.cs (1)
73
this.listView1.
Items
.AddRange(new System.Windows.Forms.ListViewItem[] {