442 references to SubItems
Accessibility_Core_App (1)
DataBindingExample.cs (1)
108
item.
SubItems
.Add(dataSet.Tables[0].Rows[i][j].ToString());
System.Windows.Forms (57)
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (2)
101
if (!Item.ListView.FullRowSelect && Item.
SubItems
.Count > 0)
103
ListViewItem.ListViewSubItem subItem = Item.
SubItems
[0];
System\Windows\Forms\Controls\ListView\ListView.cs (19)
2711
if (nmcd->iSubItem < Items[itemIndex].
SubItems
.Count)
2717
if (nmcd->iSubItem == 0 && Items[itemIndex].
SubItems
.Count > 1)
2732
Items[itemIndex].
SubItems
[nmcd->iSubItem],
2788
if (item is not null && subitem < item.
SubItems
.Count)
2794
subItemFont = new Font(item.
SubItems
[0].Font, FontStyle.Underline);
2798
subItemFont = item.
SubItems
[subitem].Font;
2808
subItemForeColor = item.
SubItems
[subitem].ForeColor;
2809
subItemBackColor = item.
SubItems
[subitem].BackColor;
3325
for (int j = 0; j < listViewItem.
SubItems
.Count; j++)
3327
ListViewSubItem listViewSubItem = listViewItem.
SubItems
[j];
3645
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(subItemIndex, Items[itemIndex].
SubItems
.Count);
3737
if (lvhi.iSubItem < item.
SubItems
.Count)
3739
_listViewSubItem = item.
SubItems
[lvhi.iSubItem];
4210
for (int nItem = 1; nItem < li.
SubItems
.Count; ++nItem)
4212
SetItemText(insertIndex, nItem, li.
SubItems
[nItem].Text, ref lvItem);
4924
int subItemCount = Items[i].
SubItems
.Count;
4927
SetItemText(i, j, Items[i].
SubItems
[j].Text, ref item);
6764
if (lvItem.
SubItems
.Count <= dispInfo->item.iSubItem)
6770
text = lvItem.
SubItems
[dispInfo->item.iSubItem].Text; // we want the sub item
System\Windows\Forms\Controls\ListView\ListView.ListViewItemCollection.cs (2)
292
for (int j = 1; j < listViewItems[i].
SubItems
.Count; j++)
294
if (WindowsFormsUtils.SafeCompareStrings(listViewItems[i].
SubItems
[j].Name, key, ignoreCase: true))
System\Windows\Forms\Controls\ListView\ListViewItem.cs (10)
298
set =>
SubItems
[0].BackColor = value;
406
set =>
SubItems
[0].Font = value;
431
SubItems
[0].ForeColor = value;
620
set =>
SubItems
[0].Name = value;
819
set =>
SubItems
[0].Text = value;
886
ListViewSubItem[] clonedSubItems = new ListViewSubItem[
SubItems
.Count];
887
for (int index = 0; index <
SubItems
.Count; ++index)
889
ListViewSubItem subItem =
SubItems
[index];
981
if (iItem == Index && iSubItem != -1 && iSubItem <
SubItems
.Count)
983
return
SubItems
[iSubItem];
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (2)
125
if (
SubItems
.Count > 1)
127
ListViewSubItem subItem =
SubItems
[1];
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
250
foreach (ListViewSubItem subItem in _owningItem.
SubItems
)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (3)
105
int subItemIndex = _owningItem.
SubItems
.IndexOf(subItemAccessibleObject.OwningSubItem);
143
if (subItemIndex < _owningItem.
SubItems
.Count)
147
return _owningItem.
SubItems
[subItemIndex].AccessibilityObject;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (7)
55
|| _owningItem.
SubItems
.Count <= index
61
return _owningItem.
SubItems
[index].AccessibilityObject;
76
if (_owningItem.
SubItems
.Count == 1)
88
|| child == _owningItem.
SubItems
[0].AccessibilityObject
95
int index = _owningItem.
SubItems
.IndexOf(subItemAccessibleObject.OwningSubItem);
103
if (_owningItem.
SubItems
.Count == 1)
109
int subItemCount = Math.Min(_owningListView.Columns.Count, _owningItem.
SubItems
.Count);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (3)
101
return _owner._listView.GetSubItemRect(_owner.Index, _owner.
SubItems
.IndexOf(this));
187
internal int Index => _owner is null ? -1 : _owner.
SubItems
.IndexOf(this);
209
_owner?.UpdateSubItems(_owner.
SubItems
.IndexOf(this));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (1)
201
_owner.
SubItems
[i]._owner = null;
System\Windows\Forms\Controls\ListView\ListViewItemConverter.cs (6)
49
for (int i = 1; i < item.
SubItems
.Count; ++i)
51
if (item.
SubItems
[i].CustomStyle)
57
ListViewItem.ListViewSubItem[] subItemArray = new ListViewItem.ListViewSubItem[item.
SubItems
.Count];
58
((ICollection)item.
SubItems
).CopyTo(subItemArray, 0);
65
ListViewItem.ListViewSubItem[] subItemArray = new ListViewItem.ListViewSubItem[item.
SubItems
.Count];
66
((ICollection)item.
SubItems
).CopyTo(subItemArray, 0);
System\Windows\Forms\Controls\ListView\ListViewLabelEditAccessibleObject.cs (1)
58
=> _owningListView.TryGetTarget(out ListView? target) && target.View == View.Tile ? target._selectedItem?.
SubItems
[1].AccessibilityObject : null,
System.Windows.Forms.Tests (317)
SerializableTypesTests.cs (1)
186
var item = Assert.Single(result.
SubItems
) as ListViewSubItem;
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (6)
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)));
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (49)
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));
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));
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));
455
Assert.NotEqual(listView.Items[0].
SubItems
[0].AccessibilityObject, lastChild1);
456
Assert.NotEqual(listView.Items[1].
SubItems
[0].AccessibilityObject, lastChild2);
471
Assert.Equal(listView.Items[0].
SubItems
[0].AccessibilityObject, lastChild1);
472
Assert.Equal(listView.Items[1].
SubItems
[0].AccessibilityObject, lastChild2);
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);
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
);
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));
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));
1150
listItem1.
SubItems
.Add(new ListViewSubItem() { Text = $"SubItem {i}" });
1151
listItem2.
SubItems
.Add(new ListViewSubItem() { Text = $"SubItem {i}" });
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));
1588
Assert.Equal(-1, listView.Items[0].AccessibilityObject.GetChildIndex(listView.Items[1].
SubItems
[1].AccessibilityObject));
1603
Assert.Equal(0, accessibleObject.GetChildIndex(listView.Items[0].
SubItems
[0].AccessibilityObject));
1628
Assert.Equal(expectedFirstSubItemIndex, accessibleObject.GetChildIndex(listView.Items[0].
SubItems
[0].AccessibilityObject));
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (7)
27
AccessibleObject expected = item.
SubItems
[0].AccessibilityObject;
40
item.
SubItems
.AddRange(new ListViewSubItem[] { new(), new(), new(), new(), new() });
43
AccessibleObject expected = item.
SubItems
[control.Columns.Count - 1].AccessibilityObject;
72
item.
SubItems
.AddRange(new ListViewSubItem[] { new(), new(), new(), new() });
76
Assert.Equal(item.
SubItems
[0].AccessibilityObject, accessibleObject.GetChild(0));
77
Assert.Equal(item.
SubItems
[1].AccessibilityObject, accessibleObject.GetChild(1));
78
Assert.Equal(item.
SubItems
[2].AccessibilityObject, accessibleObject.GetChild(2));
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (108)
106
AccessibleObject accessibleObject = list.Items[0].
SubItems
[1].AccessibilityObject;
143
AccessibleObject subItemAccObj1 = listViewItem.
SubItems
[0].AccessibilityObject;
144
AccessibleObject subItemAccObj2 = listViewItem.
SubItems
[1].AccessibilityObject;
145
AccessibleObject subItemAccObj3 = listViewItem.
SubItems
[2].AccessibilityObject;
147
AccessibleObject subItemAccObjInGroup1 = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
148
AccessibleObject subItemAccObjInGroup2 = listViewItemInGroup.
SubItems
[1].AccessibilityObject;
149
AccessibleObject subItemAccObjInGroup3 = listViewItemInGroup.
SubItems
[2].AccessibilityObject;
190
AccessibleObject subItemAccObj1 = listViewItem.
SubItems
[0].AccessibilityObject;
191
AccessibleObject subItemAccObj2 = listViewItem.
SubItems
[1].AccessibilityObject;
192
AccessibleObject subItemAccObj3 = listViewItem.
SubItems
[2].AccessibilityObject;
194
AccessibleObject subItemAccObjInGroup1 = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
195
AccessibleObject subItemAccObjInGroup2 = listViewItemInGroup.
SubItems
[1].AccessibilityObject;
196
AccessibleObject subItemAccObjInGroup3 = listViewItemInGroup.
SubItems
[2].AccessibilityObject;
220
AccessibleObject subItemAccObj1 = listViewItem.
SubItems
[0].AccessibilityObject;
221
AccessibleObject subItemAccObj2 = listViewItem.
SubItems
[1].AccessibilityObject;
222
AccessibleObject subItemAccObj3 = listViewItem.
SubItems
[2].AccessibilityObject;
224
AccessibleObject subItemAccObjInGroup1 = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
225
AccessibleObject subItemAccObjInGroup2 = listViewItemInGroup.
SubItems
[1].AccessibilityObject;
226
AccessibleObject subItemAccObjInGroup3 = listViewItemInGroup.
SubItems
[2].AccessibilityObject;
250
AccessibleObject subItemAccObj1 = listViewItem.
SubItems
[0].AccessibilityObject;
251
AccessibleObject subItemAccObj2 = listViewItem.
SubItems
[1].AccessibilityObject;
252
AccessibleObject subItemAccObj3 = listViewItem.
SubItems
[2].AccessibilityObject;
254
AccessibleObject subItemAccObjInGroup1 = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
255
AccessibleObject subItemAccObjInGroup2 = listViewItemInGroup.
SubItems
[1].AccessibilityObject;
256
AccessibleObject subItemAccObjInGroup3 = listViewItemInGroup.
SubItems
[2].AccessibilityObject;
291
AccessibleObject subItemAccObj1 = listViewItem.
SubItems
[0].AccessibilityObject;
292
AccessibleObject subItemAccObj2 = listViewItem.
SubItems
[1].AccessibilityObject;
293
AccessibleObject subItemAccObj3 = listViewItem.
SubItems
[2].AccessibilityObject;
295
AccessibleObject subItemAccObjInGroup1 = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
296
AccessibleObject subItemAccObjInGroup2 = listViewItemInGroup.
SubItems
[1].AccessibilityObject;
297
AccessibleObject subItemAccObjInGroup3 = listViewItemInGroup.
SubItems
[2].AccessibilityObject;
327
AccessibleObject subItemAccObj1 = listViewItem.
SubItems
[0].AccessibilityObject;
328
AccessibleObject subItemAccObj2 = listViewItem.
SubItems
[1].AccessibilityObject;
329
AccessibleObject subItemAccObj3 = listViewItem.
SubItems
[2].AccessibilityObject;
331
AccessibleObject subItemAccObjInGroup1 = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
332
AccessibleObject subItemAccObjInGroup2 = listViewItemInGroup.
SubItems
[1].AccessibilityObject;
333
AccessibleObject subItemAccObjInGroup3 = listViewItemInGroup.
SubItems
[2].AccessibilityObject;
360
AccessibleObject subItemAccObj = listViewItem.
SubItems
[0].AccessibilityObject;
361
AccessibleObject subItemAccInGroup = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
369
Assert.Same(listViewItem.
SubItems
[1].AccessibilityObject, nextSubItemAccObj1);
372
Assert.Same(listViewItemInGroup.
SubItems
[1].AccessibilityObject, nextSubItemAccInGroup1);
386
AccessibleObject subItemAccObj = listViewItem.
SubItems
[0].AccessibilityObject;
387
AccessibleObject subItemAccInGroup = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
412
AccessibleObject subItemAccObj = listViewItem.
SubItems
[0].AccessibilityObject;
413
AccessibleObject subItemAccInGroup = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
431
AccessibleObject subItemAccObj = listViewItem.
SubItems
[3].AccessibilityObject;
432
AccessibleObject subItemAccInGroup = listViewItemInGroup.
SubItems
[3].AccessibilityObject;
444
Assert.Same(listViewItem.
SubItems
[2].AccessibilityObject, previousSubItemAccObj3);
445
Assert.Same(listViewItem.
SubItems
[1].AccessibilityObject, previousSubItemAccObj2);
446
Assert.Same(listViewItem.
SubItems
[0].AccessibilityObject, previousSubItemAccObj1);
449
Assert.Same(listViewItemInGroup.
SubItems
[2].AccessibilityObject, previousSubItemAccInGroup3);
450
Assert.Same(listViewItemInGroup.
SubItems
[1].AccessibilityObject, previousSubItemAccInGroup2);
451
Assert.Same(listViewItemInGroup.
SubItems
[0].AccessibilityObject, previousSubItemAccInGroup1);
465
AccessibleObject subItemAccObj = listViewItem.
SubItems
[0].AccessibilityObject;
466
AccessibleObject subItemAccInGroup = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
471
listViewItem.
SubItems
.Add("SubItem");
472
listViewItemInGroup.
SubItems
.Add("SubItem");
474
Assert.Same(listViewItem.
SubItems
[1].AccessibilityObject, subItemAccObj.FragmentNavigate(NavigateDirection.NavigateDirection_NextSibling));
475
Assert.Same(listViewItemInGroup.
SubItems
[1].AccessibilityObject, subItemAccInGroup.FragmentNavigate(NavigateDirection.NavigateDirection_NextSibling));
494
listViewItem.
SubItems
.Add("SubItem");
495
listViewItemInGroup.
SubItems
.Add("SubItem");
497
Assert.Same(listViewItem.
SubItems
[1].AccessibilityObject, subItemAccObj.FragmentNavigate(NavigateDirection.NavigateDirection_PreviousSibling));
498
Assert.Same(listViewItemInGroup.
SubItems
[1].AccessibilityObject, subItemAccInGroup.FragmentNavigate(NavigateDirection.NavigateDirection_PreviousSibling));
511
AccessibleObject subItemAccObj = listViewItem.
SubItems
[0].AccessibilityObject;
512
AccessibleObject subItemAccInGroup = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
514
Assert.Same(listViewItem.
SubItems
[1].AccessibilityObject, subItemAccObj.FragmentNavigate(NavigateDirection.NavigateDirection_NextSibling));
515
Assert.Same(listViewItemInGroup.
SubItems
[1].AccessibilityObject, subItemAccInGroup.FragmentNavigate(NavigateDirection.NavigateDirection_NextSibling));
517
listViewItem.
SubItems
.RemoveAt(1);
518
listViewItemInGroup.
SubItems
.RemoveAt(1);
537
Assert.Same(listViewItem.
SubItems
[1].AccessibilityObject, subItemAccObj.FragmentNavigate(NavigateDirection.NavigateDirection_PreviousSibling));
538
Assert.Same(listViewItemInGroup.
SubItems
[1].AccessibilityObject, subItemAccInGroup.FragmentNavigate(NavigateDirection.NavigateDirection_PreviousSibling));
540
listViewItem.
SubItems
.Add("SubItem");
541
listViewItemInGroup.
SubItems
.Add("SubItem");
575
Assert.Same(listView.Items[0].
SubItems
[0].AccessibilityObject, previousSubItemAccObj1);
581
Assert.Same(listViewItemInGroup.
SubItems
[0].AccessibilityObject, previousSubItemAccInGroup1);
595
AccessibleObject subItemAccObj = listView.Items[0].
SubItems
[0].AccessibilityObject;
596
AccessibleObject subItemAccInGroup = listViewItemInGroup.
SubItems
[0].AccessibilityObject;
652
ListViewItem.ListViewSubItem subItem = listViewItem1.
SubItems
[0];
656
int expectedWidth = listViewItem1.
SubItems
[1].Bounds.X - subItem.Bounds.X;
701
Assert.Equal(0, listViewItem1.
SubItems
[0].AccessibilityObject.Column);
702
Assert.Equal(1, listViewItem1.
SubItems
[1].AccessibilityObject.Column);
703
Assert.Equal(2, listViewItem1.
SubItems
[2].AccessibilityObject.Column);
704
Assert.Equal(-1, listViewItem1.
SubItems
[3].AccessibilityObject.Column);
742
Assert.Equal(-1, listViewItem1.
SubItems
[0].AccessibilityObject.Column);
743
Assert.Equal(-1, listViewItem1.
SubItems
[1].AccessibilityObject.Column);
744
Assert.Equal(-1, listViewItem1.
SubItems
[2].AccessibilityObject.Column);
745
Assert.Equal(-1, listViewItem1.
SubItems
[3].AccessibilityObject.Column);
814
listItem1.
SubItems
.Add($"SubItem {i}");
815
listItem2.
SubItems
.Add($"SubItem {i}");
879
listView.Items[0].
SubItems
.Add("Test item 12");
882
var subItemAccessibleObject = listView.Items[0].
SubItems
[0].AccessibilityObject;
901
listView.Items[0].
SubItems
.Add("Test item 12");
904
var subItemAccessibleObject = listView.Items[0].
SubItems
[0].AccessibilityObject;
1017
var subItemAccessibleObject = (ListViewSubItemAccessibleObject)control.Items[0].
SubItems
[i].AccessibilityObject;
1041
var subItemAccessibleObject = (ListViewSubItemAccessibleObject)control.Items[0].
SubItems
[1].AccessibilityObject;
1052
listViewItem.
SubItems
.Add(listViewSubItem);
1064
listViewItem.
SubItems
.Add(listViewSubItem);
1080
listViewItem.
SubItems
.Add(listViewSubItem);
1096
listViewItem.
SubItems
.Add(listViewSubItem);
1112
listViewItem.
SubItems
.Add(listViewSubItem);
1116
listView.Items[0].
SubItems
.Remove(listViewSubItem);
1128
listViewItem.
SubItems
.Add(listViewSubItem);
1132
listView.Items[0].
SubItems
.Clear();
1144
listViewItem.
SubItems
.Add(listViewSubItem);
1160
listViewItem.
SubItems
.Add(listViewSubItem);
1164
int subItemIndex = listView.Items[0].
SubItems
.IndexOf(listViewSubItem);
1165
listView.Items[0].
SubItems
[subItemIndex] = new ListViewItem.ListViewSubItem();
1175
foreach (ListViewItem.ListViewSubItem subItem in item.
SubItems
)
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (1)
165
item.
SubItems
.Add(subItem);
System\Windows\Forms\DrawListViewItemEventArgsTests.cs (2)
92
subItemsItem.
SubItems
.Add(new ListViewItem.ListViewSubItem());
100
fullRowSelectListViewItem.
SubItems
.Add(new ListViewItem.ListViewSubItem());
System\Windows\Forms\ListView.ListViewItemCollectionTests.cs (3)
42
child3.
SubItems
.Add(grandchild1);
43
child3.
SubItems
.Add(grandchild2);
44
child3.
SubItems
.Add(grandchild3);
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (3)
179
listViewItem.
SubItems
.Add(new ListViewSubItem(listViewItem, new string('t', 10)));
195
listViewItem.
SubItems
.Add(listViewSubItem);
784
listViewItem.
SubItems
.Add(i.ToString());
System\Windows\Forms\ListViewItemTests.cs (66)
33
ListViewItem.ListViewSubItem subItem = Assert.Single(item.
SubItems
.Cast<ListViewItem.ListViewSubItem>());
35
Assert.Same(item.
SubItems
, item.
SubItems
);
72
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
73
Assert.Same(item.
SubItems
, item.
SubItems
);
110
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
111
Assert.Same(item.
SubItems
, item.
SubItems
);
148
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
149
Assert.Same(item.
SubItems
, item.
SubItems
);
186
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
187
Assert.Same(item.
SubItems
, item.
SubItems
);
223
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
224
Assert.Same(item.
SubItems
, item.
SubItems
);
260
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
261
Assert.Same(item.
SubItems
, item.
SubItems
);
298
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
299
Assert.Same(item.
SubItems
, item.
SubItems
);
336
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
337
Assert.Same(item.
SubItems
, item.
SubItems
);
373
ListViewItem.ListViewSubItem subItem = Assert.Single(item.
SubItems
.Cast<ListViewItem.ListViewSubItem>());
375
Assert.Same(item.
SubItems
, item.
SubItems
);
411
ListViewItem.ListViewSubItem subItem = Assert.Single(item.
SubItems
.Cast<ListViewItem.ListViewSubItem>());
413
Assert.Same(item.
SubItems
, item.
SubItems
);
449
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
450
Assert.Same(item.
SubItems
, item.
SubItems
);
486
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
487
Assert.Same(item.
SubItems
, item.
SubItems
);
524
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
525
Assert.Same(item.
SubItems
, item.
SubItems
);
562
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
563
Assert.Same(item.
SubItems
, item.
SubItems
);
600
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
601
Assert.Same(item.
SubItems
, item.
SubItems
);
637
ListViewItem.ListViewSubItem subItem = Assert.Single(item.
SubItems
.Cast<ListViewItem.ListViewSubItem>());
639
Assert.Same(item.
SubItems
, item.
SubItems
);
675
ListViewItem.ListViewSubItem subItem = Assert.Single(item.
SubItems
.Cast<ListViewItem.ListViewSubItem>());
677
Assert.Same(item.
SubItems
, item.
SubItems
);
713
ListViewItem.ListViewSubItem subItem = Assert.Single(item.
SubItems
.Cast<ListViewItem.ListViewSubItem>());
715
Assert.Same(item.
SubItems
, item.
SubItems
);
750
ListViewItem.ListViewSubItem subItem = Assert.Single(item.
SubItems
.Cast<ListViewItem.ListViewSubItem>());
752
Assert.Same(item.
SubItems
, item.
SubItems
);
789
AssertEqualListViewSubItem(subItems, item.
SubItems
.Cast<ListViewItem.ListViewSubItem>().ToArray());
790
Assert.Same(item.
SubItems
, item.
SubItems
);
819
ListViewItem.ListViewSubItem subItem = Assert.Single(item.
SubItems
.Cast<ListViewItem.ListViewSubItem>());
821
Assert.Same(item.
SubItems
, item.
SubItems
);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (53)
883
listViewItem.
SubItems
.Add(subItem);
893
listViewItem.
SubItems
.Add("Test");
895
Assert.Same(listViewItem, listViewItem.
SubItems
[1]._owner);
903
listViewItem.
SubItems
.Add("Test", Color.White, Color.Black, SystemFonts.MenuFont);
905
Assert.Same(listViewItem, listViewItem.
SubItems
[1]._owner);
918
listViewItem.
SubItems
.AddRange([subItem1, subItem2]);
929
listViewItem.
SubItems
.AddRange(["Test 1", "Test 2"]);
931
Assert.Same(listViewItem, listViewItem.
SubItems
[1]._owner);
932
Assert.Same(listViewItem, listViewItem.
SubItems
[2]._owner);
940
listViewItem.
SubItems
.AddRange(["Test 1", "Test 2"], Color.White, Color.Black, SystemFonts.MenuFont);
942
Assert.Same(listViewItem, listViewItem.
SubItems
[1]._owner);
943
Assert.Same(listViewItem, listViewItem.
SubItems
[2]._owner);
952
ListViewItem.ListViewSubItem oldSubItem = listViewItem.
SubItems
[0];
954
listViewItem.
SubItems
.Add(subItem1);
955
listViewItem.
SubItems
.Add(subItem2);
961
listViewItem.
SubItems
.Clear();
963
Assert.Same(listViewItem, listViewItem.
SubItems
[0]._owner);
977
((IList)listViewItem.
SubItems
).Add(subItem);
988
ListViewItem.ListViewSubItem oldSubItem1 = listViewItem.
SubItems
[0];
990
listViewItem.
SubItems
.Add(oldSubItem2);
997
((IList)listViewItem.
SubItems
).Insert(0, subItem1);
998
((IList)listViewItem.
SubItems
).Insert(1, subItem2);
1000
Assert.Equal(4, listViewItem.
SubItems
.Count);
1002
Assert.Same(subItem1, listViewItem.
SubItems
[0]);
1003
Assert.Same(subItem2, listViewItem.
SubItems
[1]);
1004
Assert.Same(oldSubItem1, listViewItem.
SubItems
[2]);
1005
Assert.Same(oldSubItem2, listViewItem.
SubItems
[3]);
1017
ListViewItem.ListViewSubItem oldSubItem = listViewItem.
SubItems
[0];
1019
listViewItem.
SubItems
.Add(subItem);
1024
listViewItem.
SubItems
.Remove(subItem);
1025
listViewItem.
SubItems
.Remove(oldSubItem);
1027
Assert.Same(listViewItem, listViewItem.
SubItems
[0]._owner);
1037
ListViewItem.ListViewSubItem oldSubItem = listViewItem.
SubItems
[0];
1042
((IList)listViewItem.
SubItems
)[0] = subItem;
1054
ListViewItem.ListViewSubItem defaultSubItem = listViewItem.
SubItems
[0];
1060
listViewItem.
SubItems
.Insert(0, subItem1);
1061
listViewItem.
SubItems
.Insert(1, subItem2);
1063
Assert.Equal(3, listViewItem.
SubItems
.Count);
1074
ListViewItem.ListViewSubItem oldSubItem = listViewItem.
SubItems
[0];
1076
listViewItem.
SubItems
.Add(subItem);
1081
listViewItem.
SubItems
.Remove(subItem);
1082
listViewItem.
SubItems
.Remove(oldSubItem);
1086
Assert.Same(listViewItem, listViewItem.
SubItems
[0]._owner);
1093
ListViewItem.ListViewSubItem oldSubItem = listViewItem.
SubItems
[0];
1095
listViewItem.
SubItems
.Add(subItem);
1100
listViewItem.
SubItems
.RemoveAt(1);
1101
listViewItem.
SubItems
.RemoveAt(0);
1105
Assert.Same(listViewItem, listViewItem.
SubItems
[0]._owner);
1112
ListViewItem.ListViewSubItem oldSubItem = listViewItem.
SubItems
[0];
1115
listViewItem.
SubItems
.Add(subItem);
1120
listViewItem.
SubItems
.RemoveByKey("Test 2");
1121
listViewItem.
SubItems
.RemoveByKey("Test 1");
1125
Assert.Same(listViewItem, listViewItem.
SubItems
[0]._owner);
System\Windows\Forms\ListViewSubItemTests.cs (15)
107
item.
SubItems
.Remove(subItem);
124
item.
SubItems
.Add(subItem);
128
item.
SubItems
.Remove(subItem);
173
item.
SubItems
.Add(subItem);
192
item.
SubItems
.Add(subItem);
243
item.
SubItems
.Remove(subItem);
261
item.
SubItems
.Add(subItem);
265
item.
SubItems
.Remove(subItem);
298
item.
SubItems
.Add(subItem);
317
item.
SubItems
.Add(subItem);
356
item.
SubItems
.Remove(subItem);
373
item.
SubItems
.Add(subItem);
377
item.
SubItems
.Remove(subItem);
424
item.
SubItems
.Add(subItem);
443
item.
SubItems
.Add(subItem);
System\Windows\Forms\ListViewTests.cs (3)
5437
item.
SubItems
.Add("Sub1");
5438
item.
SubItems
.Add("Sub2");
5447
Point subItemLocation = listView.Items[0].
SubItems
[subItemIndex].Bounds.Location + new Size(1, 1);
System.Windows.Forms.UI.IntegrationTests (49)
ListViewTests.cs (49)
129
AccessibleObject? expectedAccessibleObject = listView.Items[itemIndex].
SubItems
[subItemIndex].AccessibilityObject;
167
AccessibleObject? accessibleObject = listView.Items[0].
SubItems
[1].AccessibilityObject;
213
Assert.Equal(listView.Items[0].
SubItems
[1].AccessibilityObject, accessibleObject.GetChild(0));
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;
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));
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));
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));
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));
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));
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);
494
Point listViewCenter = GetCenter(listView.RectangleToScreen(listView.Items[0].
SubItems
[1].Bounds));
500
listViewCenter = GetCenter(listView.RectangleToScreen(listView.Items[2].
SubItems
[1].Bounds));
559
listViewItem.
SubItems
.Add(new ListViewItem.ListViewSubItem() { Text = $"Test SubItem{i}" });
WinFormsControlsTest (18)
ListViewTest.cs (9)
87
item1.
SubItems
.Add("1");
88
item1.
SubItems
.Add("2");
89
item1.
SubItems
.Add("3");
91
item2.
SubItems
.Add("4");
92
item2.
SubItems
.Add("5");
93
item2.
SubItems
.Add("6");
99
item3.
SubItems
.Add("7");
100
item3.
SubItems
.Add("8");
101
item3.
SubItems
.Add("9");
MultipleControls.cs (9)
49
item1.
SubItems
.Add("sub1");
50
item1.
SubItems
.Add("sub2");
51
item1.
SubItems
.Add("sub3");
53
item2.
SubItems
.Add("sub4");
54
item2.
SubItems
.Add("sub5");
55
item2.
SubItems
.Add("sub6");
61
item3.
SubItems
.Add("sub7");
62
item3.
SubItems
.Add("sub8");
63
item3.
SubItems
.Add("sub9");