1 type derived from ListViewItem
System.Windows.Forms.Tests (1)
System\Windows\Forms\ListViewTests.cs (1)
6067
private class SubListViewItem :
ListViewItem
650 instantiations of ListViewItem
Accessibility_Core_App (5)
CommonControl1.Designer.cs (4)
31
System.Windows.Forms.ListViewItem listViewItem1 =
new
("1");
32
System.Windows.Forms.ListViewItem listViewItem2 =
new
("2");
33
System.Windows.Forms.ListViewItem listViewItem3 =
new
("3");
34
System.Windows.Forms.ListViewItem listViewItem4 =
new
("4");
DataBindingExample.cs (1)
103
ListViewItem item =
new
(itemName, i);
System.Windows.Forms (11)
System\Windows\Forms\Controls\ListView\ListView.ListViewItemCollection.cs (10)
94
: new
ListViewItem
(value!.ToString(), -1);
154
ListViewItem item =
new
(text, imageIndex);
179
ListViewItem item =
new
(text, imageKey);
191
ListViewItem item =
new
(text, imageKey)
206
ListViewItem item =
new
(text, imageIndex)
386
return Insert(index, new
ListViewItem
(text));
391
return Insert(index, new
ListViewItem
(text, imageIndex));
409
=> Insert(index, new
ListViewItem
(text, imageKey));
412
=> Insert(index, new
ListViewItem
(text, imageKey)
418
=> Insert(index, new
ListViewItem
(text, imageIndex)
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
906
newItem = new
ListViewItem
(clonedSubItems, ImageIndexer.Index);
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\MaskDesignerDialog.cs (2)
520
_listViewCannedMasks.Items.Add(new
ListViewItem
([maskDescriptor.Name!, sample, validatingType]));
525
_listViewCannedMasks.Items.Add(new
ListViewItem
([_customMaskDescriptor.Name, "", nullEntry]));
System\Windows\Forms\Design\StyleEditorForm.cs (2)
600
_columnsAndRowsListView.Items.Add(new
ListViewItem
([baseName + (i + 1).ToString(CultureInfo.InvariantCulture), sizeType, sizeValue]));
829
new
ListViewItem
(
System.Windows.Forms.Tests (611)
SerializableTypesTests.cs (3)
132
listViewGroup.Items.Add(new
ListViewItem
("Item"));
163
ListViewItem listViewItem =
new
("Item1", 0)
211
new
ListViewItem
(),
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (64)
86
listView.Items.Add(new
ListViewItem
());
87
ListViewItem item =
new
();
88
ListViewItem item2 =
new
();
116
listView.Items.Add(new
ListViewItem
());
117
ListViewItem item =
new
();
118
ListViewItem item2 =
new
();
140
listView.Items.Add(new
ListViewItem
());
141
ListViewItem item =
new
();
142
ListViewItem item2 =
new
();
164
listView.Items.Add(new
ListViewItem
());
165
listView.Items.Add(new
ListViewItem
());
181
listView.Items.Add(new
ListViewItem
());
182
listView.Items.Add(new
ListViewItem
());
268
ListViewItem listViewItem1 =
new
("Test item 1");
269
ListViewItem listViewItem2 =
new
("Test item 2");
391
ListViewItem listViewItem1 =
new
("Test item 1");
392
ListViewItem listViewItem2 =
new
("Test item 2");
393
ListViewItem listViewItem3 =
new
("Test item 3");
514
ListViewItem listViewItem1 =
new
("Test item 1");
515
ListViewItem listViewItem2 =
new
("Test item 2");
516
ListViewItem listViewItem3 =
new
("Test item 3");
585
ListViewItem listViewItem1 =
new
("Test item 1");
586
ListViewItem listViewItem2 =
new
("Test item 2");
587
ListViewItem listViewItem3 =
new
("Test item 3");
640
ListViewItem listViewItem1 =
new
("Test item 1");
641
ListViewItem listViewItem2 =
new
("Test item 2");
642
ListViewItem listViewItem3 =
new
("Test item 3");
720
ListViewItem listViewItem1 =
new
("Test item 1");
721
ListViewItem listViewItem2 =
new
("Test item 2");
722
ListViewItem listViewItem3 =
new
("Test item 3");
805
listView.Groups[0].Items.Add(new
ListViewItem
());
854
ListViewItem listViewItem1 =
new
("Test item 1");
855
ListViewItem listViewItem2 =
new
("Test item 2");
856
ListViewItem listViewItem3 =
new
("Test item 3");
924
ListViewItem listItem1 =
new
(listGroup1);
925
ListViewItem listItem2 =
new
();
926
ListViewItem listItem3 =
new
(listGroup2);
927
ListViewItem listItem4 =
new
(listGroup2);
957
ListViewItem listItem1 =
new
();
975
ListViewItem listItem1 =
new
();
1014
ListViewItem listItem2 =
new
("Group item 2");
1015
ListViewItem listItem3 =
new
("Item 3");
1059
ListViewItem listItem1 =
new
();
1090
ListViewItem listItem1 =
new
();
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"]));
1220
listView.Items.Add(new
ListViewItem
(["Item 1"]));
1221
listView.Items.Add(new
ListViewItem
(["Item 2"]));
1393
ListViewItem listItem2 =
new
("Group item 2", listViewGroup);
1394
ListViewItem listItem3 =
new
("Item 3");
1488
ListViewItem listViewItem1 =
new
();
1489
ListViewItem listViewItem2 =
new
();
1573
ListViewItem listViewItem1 =
new
();
1574
ListViewItem listViewItem2 =
new
();
1674
ListViewItem listViewItem1 =
new
();
1675
ListViewItem listViewItem2 =
new
();
1730
ListViewItem listViewItem1 =
new
();
1731
ListViewItem listViewItem2 =
new
();
1732
ListViewItem listViewItem3 =
new
();
1751
listView.Items.AddRange(Enumerable.Range(0, 11).Select(i => new
ListViewItem
()).ToArray());
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (73)
21
listGroup.Items.Add(new
ListViewItem
());
39
listGroup.Items.Add(new
ListViewItem
());
54
listGroup.Items.Add(new
ListViewItem
());
85
listGroup.Items.Add(new
ListViewItem
());
86
list.Items.Add(new
ListViewItem
());
118
listGroup.Items.Add(new
ListViewItem
());
146
items.Add(new
ListViewItem
(groups[0]));
147
items.Add(new
ListViewItem
(groups[0]));
148
items.Add(new
ListViewItem
());
149
items.Add(new
ListViewItem
(groups[1]));
150
items.Add(new
ListViewItem
(groups[1]));
151
items.Add(new
ListViewItem
(groups[1]));
215
items.Add(new
ListViewItem
(groups[0]));
216
items.Add(new
ListViewItem
(groups[0]));
217
items.Add(new
ListViewItem
(groups[0]));
218
items.Add(new
ListViewItem
(groups[1]));
219
items.Add(new
ListViewItem
(groups[1]));
220
items.Add(new
ListViewItem
(groups[1]));
279
ListViewItem listItem1 =
new
("Item1");
280
ListViewItem listItem2 =
new
("Item2");
328
listView.Items.Add(new
ListViewItem
("a", group));
379
items.Add(new
ListViewItem
(groups[0]));
380
items.Add(new
ListViewItem
(groups[0]));
381
items.Add(new
ListViewItem
());
382
items.Add(new
ListViewItem
(groups[1]));
383
items.Add(new
ListViewItem
(groups[1]));
384
items.Add(new
ListViewItem
(groups[1]));
385
items.Add(new
ListViewItem
(groups[1]));
386
items.Add(new
ListViewItem
(groups[1]));
388
ListViewItem itemWithoutListView1 =
new
(groups[1]);
389
ListViewItem itemWithoutListView2 =
new
(groups[1]);
474
items.Add(new
ListViewItem
(groups[0]));
475
items.Add(new
ListViewItem
(groups[0]));
476
items.Add(new
ListViewItem
());
477
items.Add(new
ListViewItem
(groups[1]));
478
items.Add(new
ListViewItem
(groups[1]));
479
items.Add(new
ListViewItem
(groups[1]));
480
items.Add(new
ListViewItem
(groups[1]));
481
items.Add(new
ListViewItem
(groups[1]));
510
items.Add(new
ListViewItem
(groups[0]));
511
items.Add(new
ListViewItem
(groups[0]));
512
items.Add(new
ListViewItem
());
513
items.Add(new
ListViewItem
(groups[1]));
514
items.Add(new
ListViewItem
(groups[1]));
515
items.Add(new
ListViewItem
(groups[1]));
595
items.Add(new
ListViewItem
(groups[0]));
596
items.Add(new
ListViewItem
());
597
items.Add(new
ListViewItem
(groups[1]));
598
items.Add(new
ListViewItem
(groups[1]));
666
ListViewItem listViewItem =
new
("Test item", listViewGroup);
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));
797
ListViewItem item1 =
new
("Item 1", group1);
798
ListViewItem item2 =
new
("Item 2", group2);
799
ListViewItem item3 =
new
("Item 2", group3);
889
ListViewItem listViewItem1 =
new
();
890
ListViewItem listViewItem2 =
new
();
1220
listView.Items.Add(new
ListViewItem
());
1239
ListViewItem listViewItem1 =
new
();
1240
ListViewItem listViewItem2 =
new
();
1241
ListViewItem listViewItem3 =
new
();
1264
ListViewItem listItem1 =
new
(listGroup1);
1265
ListViewItem listItem2 =
new
(listGroup1);
1266
ListViewItem listItem3 =
new
();
1329
ListViewItem item =
new
("Test")
1402
ListViewItem listViewInvisibleItem1 =
new
("Invisible item 1");
1403
ListViewItem listViewVisibleItem1 =
new
("Visible item 1");
1404
ListViewItem listViewInvisibleItem2 =
new
("Invisible item 1");
1405
ListViewItem listViewVisibleItem2 =
new
("Visible item 1");
1431
ListViewItem listViewItem1 =
new
("Test item 1");
1439
ListViewItem listViewItem2 =
new
("Test item 2");
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (49)
17
ListViewItem listItem =
new
();
27
ListViewItem itemWithoutList =
new
();
36
ListViewItem listItem =
new
();
76
ListViewItem listViewItem1 =
new
();
77
ListViewItem listViewItem2 =
new
(listviewGroup);
94
ListViewItem listItem =
new
("ListItem");
843
ListViewItem listViewItem =
new
("Item");
891
ListViewItem listViewItem =
new
("Item");
926
ListViewItem listViewItem =
new
("Item");
1138
ListViewItem listItem1 =
new
("Item 1");
1139
ListViewItem listItem2 =
new
("Item 2");
1198
ListViewItem listItem2 =
new
("Group item 2");
1199
ListViewItem listItem3 =
new
("Item 3");
1257
ListViewItem listViewInvisibleItem1 =
new
("Invisible item 1");
1258
ListViewItem listViewVisibleItem1 =
new
("Visible item 1");
1259
ListViewItem listViewInvisibleItem2 =
new
("Invisible item 1");
1260
ListViewItem listViewVisibleItem2 =
new
("Visible item 1");
1291
listView.Items.Add(new
ListViewItem
("Item 1"));
1292
listView.Items.Add(new
ListViewItem
("Item 2"));
1293
listView.Items.Add(new
ListViewItem
("Item 3"));
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"));
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"));
1455
listView.Items.Add(new
ListViewItem
("Item 1"));
1456
listView.Items.Add(new
ListViewItem
("Item 2"));
1457
listView.Items.Add(new
ListViewItem
("Item 3"));
1537
listView.Items.Add(new
ListViewItem
(["Item 1", "SubItem 1", "SubItem 2"]));
1567
listView.Items.Add(new
ListViewItem
(["Item 1", "SubItem 1", "SubItem 2"]));
1585
listView.Items.Add(new
ListViewItem
(["Item 1", "SubItem 11", "SubItem 12"]));
1586
listView.Items.Add(new
ListViewItem
(["Item 2", "SubItem 21", "SubItem 22"]));
1600
listView.Items.Add(new
ListViewItem
(["Item 1"]));
1624
ListViewItem listViewItem =
new
("Item 1", imageIndex: hasImage ? 0 : -1);
1644
listView.Items.Add(new
ListViewItem
(["Item 1", "SubItem 11", "SubItem 12"]));
1659
listView.Items.Add(new
ListViewItem
("Test"));
1700
listView.Items.Add(new
ListViewItem
("Test"));
1754
listView.Items.Add(new
ListViewItem
(["1", "2"]));
1787
listView.Items.Add(new
ListViewItem
(["1"]));
1846
ListViewItem item =
new
("ListItem");
1860
ListViewItem item =
new
("ListItem");
1874
ListViewItem item =
new
("ListItem");
1888
ListViewItem item =
new
("ListItem");
1902
ListViewItem item =
new
("ListItem");
1906
listView.Items[0] = new
ListViewItem
();
1928
ListViewItem listViewItem1 =
new
("Item1");
1929
ListViewItem listViewItem2 =
new
("Item2");
1930
ListViewItem listViewItem3 =
new
("Item3");
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemBaseAccessibleObjectTests.cs (25)
23
ListViewItem item =
new
();
34
ListViewItem item =
new
();
45
ListViewItem item =
new
();
58
ListViewItem item =
new
();
70
ListViewItem item =
new
() { Selected = isSelected };
81
ListViewItem item =
new
();
98
ListViewItem item =
new
();
116
ListViewItem item =
new
();
133
ListViewItem item =
new
();
151
ListViewItem item =
new
();
181
ListViewItem item =
new
();
200
ListViewItem item =
new
();
218
ListViewItem item =
new
();
231
ListViewItem item =
new
();
244
ListViewItem item =
new
();
257
ListViewItem item =
new
();
270
ListViewItem item =
new
();
286
ListViewItem item =
new
();
302
ListViewItem item =
new
();
318
ListViewItem item =
new
()
339
ListViewItem item =
new
();
350
ListViewItem item =
new
();
363
ListViewItem item =
new
() { Checked = isChecked };
376
ListViewItem item =
new
() { Checked = isChecked };
393
ListViewItem item =
new
();
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (8)
22
ListViewItem item =
new
();
37
ListViewItem item =
new
();
53
ListViewItem item =
new
();
69
ListViewItem item =
new
();
87
ListViewItem item =
new
();
100
ListViewItem item =
new
();
115
ListViewItem item =
new
();
151
ListViewItem listViewItem =
new
("1", 0);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemImageAccessibleObjectTests.cs (2)
17
ListViewItem listViewItem =
new
("Test", 0);
42
ListViewItem listViewItem =
new
("Test", 0);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemListAccessibleObjectTests.cs (3)
21
Assert.Throws<InvalidOperationException>(() => new ListViewItemListAccessibleObject(new
ListViewItem
()));
29
control.Items.Add(new
ListViewItem
());
40
control.Items.Add(new
ListViewItem
());
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemTileAccessibleObjectTests.cs (1)
19
Assert.Throws<InvalidOperationException>(() => new ListViewItemTileAccessibleObject(new
ListViewItem
()));
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemWithImageAccessibleObjectTests.cs (6)
17
control.Items.Add(new
ListViewItem
());
33
ListViewItem listViewItem =
new
("Test", 0);
63
control.Items.Add(new
ListViewItem
());
78
ListViewItem listViewItem =
new
("Test", 0);
99
control.Items.Add(new
ListViewItem
());
115
ListViewItem listViewItem =
new
("Test", 0);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (19)
104
list.Items.Add(new
ListViewItem
(["Test 1", "Test 2"]));
802
ListViewItem listItem1 =
new
("Item 1");
803
ListViewItem listItem2 =
new
("Item 2");
855
ListViewItem listViewItem =
new
("Test item")
878
listView.Items.Add(new
ListViewItem
("Test item 11"));
900
listView.Items.Add(new
ListViewItem
("Test item 11"));
914
ListViewItem listViewItem =
new
("Test item");
927
ListViewItem listViewItem =
new
("Test item");
942
ListViewItem listViewItem =
new
("Test item");
971
ListViewItem listViewItem =
new
("Test item");
1050
ListViewItem listViewItem =
new
();
1062
ListViewItem listViewItem =
new
();
1078
ListViewItem listViewItem =
new
();
1094
ListViewItem listViewItem =
new
();
1110
ListViewItem listViewItem =
new
();
1126
ListViewItem listViewItem =
new
();
1142
ListViewItem listViewItem =
new
();
1148
listView.Items[0] = new
ListViewItem
();
1158
ListViewItem listViewItem =
new
();
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (1)
163
ListViewItem item =
new
("Test", 0);
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (1)
226
new
ListViewItem
(),
System\Windows\Forms\DrawListViewItemEventArgsTests.cs (15)
25
ListViewItem item =
new
();
38
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewItemEventArgs(null, new
ListViewItem
(), new Rectangle(1, 2, 3, 4), 0, ListViewItemStates.Default));
55
DrawListViewItemEventArgs e = new(graphics, new
ListViewItem
(), new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked)
72
yield return new object[] { new
ListViewItem
(), new Rectangle(1, 2, 3, 4), ListViewItemStates.Default };
73
yield return new object[] { new
ListViewItem
(), new Rectangle(1, 2, 3, 4), ListViewItemStates.Focused };
74
yield return new object[] { new
ListViewItem
(), new Rectangle(1, 2, 3, 4), ListViewItemStates.Checked };
75
yield return new object[] { new
ListViewItem
(), Rectangle.Empty, ListViewItemStates.Default };
76
yield return new object[] { new
ListViewItem
(), Rectangle.Empty, ListViewItemStates.Focused };
77
yield return new object[] { new
ListViewItem
(), Rectangle.Empty, ListViewItemStates.Checked };
78
yield return new object[] { new
ListViewItem
(), new Rectangle(-1, -2, -3, -4), ListViewItemStates.Default };
79
yield return new object[] { new
ListViewItem
(), new Rectangle(-1, -2, -3, -4), ListViewItemStates.Focused };
80
yield return new object[] { new
ListViewItem
(), new Rectangle(-1, -2, -3, -4), ListViewItemStates.Checked };
85
ListViewItem listViewItem =
new
();
91
ListViewItem subItemsItem =
new
();
99
ListViewItem fullRowSelectListViewItem =
new
();
System\Windows\Forms\DrawListViewSubItemEventArgsTests.cs (20)
13
yield return new object[] { Rectangle.Empty, new
ListViewItem
(), new ListViewItem.ListViewSubItem(), -2, -2, null, ListViewItemStates.Checked - 1 };
14
yield return new object[] { new Rectangle(1, 2, 3, 4), new
ListViewItem
(), null, -1, -1, new ColumnHeader(), ListViewItemStates.Checked };
15
yield return new object[] { new Rectangle(1, 2, 3, 4), new
ListViewItem
(), new ListViewItem.ListViewSubItem(), -1, -1, new ColumnHeader(), ListViewItemStates.Checked };
16
yield return new object[] { new Rectangle(-1, 2, -3, -4), new
ListViewItem
(), new ListViewItem.ListViewSubItem(), 0, 0, new ColumnHeader(), ListViewItemStates.Focused };
17
yield return new object[] { new Rectangle(1, 2, 3, 4), new
ListViewItem
(), new ListViewItem.ListViewSubItem(), 1, 2, new ColumnHeader(), ListViewItemStates.Checked };
41
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewSubItemEventArgs(null, new Rectangle(1, 2, 3, 4), new
ListViewItem
(), new ListViewItem.ListViewSubItem(), -1, 0, new ColumnHeader(), ListViewItemStates.Default));
59
Assert.Throws<ArgumentNullException>("subItem", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), new
ListViewItem
(), null, itemIndex, 0, new ColumnHeader(), ListViewItemStates.Default));
68
DrawListViewSubItemEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), new
ListViewItem
(), null, -1, -1, new ColumnHeader(), ListViewItemStates.Checked)
85
yield return new object[] { new Rectangle(-1, -2, -3, -4), new
ListViewItem
(), null, -1, null, ListViewItemStates.Default };
86
yield return new object[] { new Rectangle(-1, -2, -3, -4), new
ListViewItem
(), null, -1, null, ListViewItemStates.Checked };
87
yield return new object[] { new Rectangle(-1, -2, -3, -4), new
ListViewItem
(), null, -1, null, ListViewItemStates.Focused };
88
yield return new object[] { new Rectangle(-1, -2, -3, -4), new
ListViewItem
(), null, -1, new ColumnHeader(), ListViewItemStates.Default };
89
yield return new object[] { new Rectangle(-1, -2, -3, -4), new
ListViewItem
(), null, -1, new ColumnHeader(), ListViewItemStates.Checked };
90
yield return new object[] { new Rectangle(-1, -2, -3, -4), new
ListViewItem
(), null, -1, new ColumnHeader(), ListViewItemStates.Focused };
91
yield return new object[] { new Rectangle(1, 2, 3, 4), new
ListViewItem
(), null, -1, null, ListViewItemStates.Default };
92
yield return new object[] { new Rectangle(1, 2, 3, 4), new
ListViewItem
(), null, -1, null, ListViewItemStates.Checked };
93
yield return new object[] { new Rectangle(1, 2, 3, 4), new
ListViewItem
(), null, -1, null, ListViewItemStates.Focused };
94
yield return new object[] { new Rectangle(1, 2, 3, 4), new
ListViewItem
(), null, -1, new ColumnHeader(), ListViewItemStates.Default };
95
yield return new object[] { new Rectangle(1, 2, 3, 4), new
ListViewItem
(), null, -1, new ColumnHeader(), ListViewItemStates.Checked };
96
yield return new object[] { new Rectangle(1, 2, 3, 4), new
ListViewItem
(), null, -1, new ColumnHeader(), ListViewItemStates.Focused };
System\Windows\Forms\ItemCheckedEventArgsTests.cs (1)
18
ListViewItem listViewItem =
new
();
System\Windows\Forms\ListView.ListViewItemCollectionTests.cs (6)
15
ListViewItem child1 =
new
()
19
ListViewItem child2 =
new
()
23
ListViewItem child3 =
new
()
71
ListViewItem child1 =
new
()
75
ListViewItem child2 =
new
()
79
ListViewItem child3 =
new
()
System\Windows\Forms\ListViewGroupCollectionTests.cs (15)
76
ListViewItem item =
new
();
82
group.Items.Add(new
ListViewItem
());
97
ListViewItem item =
new
();
103
group.Items.Add(new
ListViewItem
());
159
ListViewItem item =
new
();
407
ListViewItem item =
new
();
411
group.Items.Add(new
ListViewItem
());
426
ListViewItem item =
new
();
430
group1.Items.Add(new
ListViewItem
());
490
ListViewItem item =
new
();
768
ListViewItem item =
new
();
772
group.Items.Add(new
ListViewItem
());
787
ListViewItem item =
new
();
791
group.Items.Add(new
ListViewItem
());
846
ListViewItem item =
new
();
System\Windows\Forms\ListViewGroupConverterTests.cs (13)
30
yield return new object[] { new
ListViewItem
(), true };
33
ListViewItem item1 =
new
();
40
ListViewItem item2 =
new
();
74
ListViewItem item =
new
();
89
yield return new object[] { new
ListViewItem
() };
92
ListViewItem item1 =
new
();
98
ListViewItem item2 =
new
();
143
yield return new object[] { new
ListViewItem
(), true };
146
ListViewItem item1 =
new
();
153
ListViewItem item2 =
new
();
259
yield return new object[] { new
ListViewItem
(), null };
262
ListViewItem item1 =
new
();
269
ListViewItem item2 =
new
();
System\Windows\Forms\ListViewGroupTests.cs (5)
1329
groupWithItems.Items.Add(new
ListViewItem
("text"));
1401
group.Items.Add(new
ListViewItem
("text"));
1429
ListViewItem listViewItem =
new
();
1430
ListViewItem listViewItemGroup =
new
();
1445
ListViewItem listViewItem =
new
();
System\Windows\Forms\ListViewHitTestInfoTests.cs (1)
12
yield return new object[] { new
ListViewItem
(), new ListViewItem.ListViewSubItem(), ListViewHitTestLocations.None - 1 };
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (19)
19
ListViewItem listViewItem =
new
();
41
ListViewItem listViewItem =
new
();
63
ListViewItem listViewItem =
new
();
86
ListViewItem listViewItem =
new
() { ToolTipText = toolTipText };
105
ListViewItem listViewItem =
new
();
124
ListViewItem listViewItem =
new
();
147
ListViewItem listViewItem = AssignItemToListView(listView, new
ListViewItem
(new string('t', 500)));
167
ListViewItem listViewItem = AssignItemToListView(listView, new
ListViewItem
(new string('t', 1)));
177
ListViewItem listViewItem =
new
(new string('t', 20));
193
ListViewItem listViewItem =
new
(new string('t', 10));
209
ListViewItem listViewItem =
new
();
220
ListViewItem listViewItem = AssignItemToListView(listView, new
ListViewItem
());
229
ListViewItem listViewItem = AssignItemToListView(listView, new
ListViewItem
());
645
ListViewItem listViewItem =
new
();
672
ListViewItem listViewItem =
new
();
700
ListViewItem listViewItem =
new
();
738
ListViewItem listViewItem =
new
();
757
_ => new
ListViewItem
(),
783
ListViewItem listViewItem =
new
(i.ToString());
System\Windows\Forms\ListViewItemConverterTests.cs (32)
69
new
ListViewItem
(),
75
new
ListViewItem
(group),
81
new
ListViewItem
("text"),
87
new
ListViewItem
("text", group),
93
new
ListViewItem
("text", "imageKey"),
99
new
ListViewItem
("text", 1),
105
new
ListViewItem
("text", "imageKey", group),
111
new
ListViewItem
("text", 1, group),
119
new
ListViewItem
([subItem1], "imageKey"),
125
new
ListViewItem
([subItem1], 1),
131
new
ListViewItem
([subItem1], "imageKey", group),
137
new
ListViewItem
([subItem1], 1, group),
143
new
ListViewItem
([subItem1, subItem2], "imageKey"),
149
new
ListViewItem
([subItem1, subItem2], 1),
155
new
ListViewItem
([subItem1, subItem2], "imageKey", group),
161
new
ListViewItem
([subItem1, subItem2], 1, group),
167
new
ListViewItem
([subItem1, subItem2, subItem3, subItem4, subItem5], "imageKey"),
173
new
ListViewItem
([subItem1, subItem2, subItem3, subItem4, subItem5], 1),
179
new
ListViewItem
([subItem1, subItem2, subItem3, subItem4, subItem5], "imageKey", group),
185
new
ListViewItem
([subItem1, subItem2, subItem3, subItem4, subItem5], 1, group),
191
new
ListViewItem
([subItem3], 1),
197
new
ListViewItem
([subItem4], 1),
203
new
ListViewItem
([subItem5], 1),
209
new
ListViewItem
([subItem3], "imageKey"),
215
new
ListViewItem
([subItem4], "imageKey"),
221
new
ListViewItem
([subItem5], "imageKey"),
229
new
ListViewItem
(["text"], "imageKey", Color.Red, Color.Blue, SystemFonts.MenuFont),
235
new
ListViewItem
(["text"], 1, Color.Red, Color.Blue, SystemFonts.MenuFont),
241
new
ListViewItem
(["text"], "imageKey", Color.Red, Color.Blue, SystemFonts.MenuFont, group),
247
new
ListViewItem
(["text"], 1, Color.Red, Color.Blue, SystemFonts.MenuFont, group),
292
Assert.Throws<NotSupportedException>(() => converter.ConvertTo(new
ListViewItem
(), destinationType));
306
ListViewItem item =
new
();
System\Windows\Forms\ListViewItemMouseHoverEventArgsTests.cs (1)
12
yield return new object[] { new
ListViewItem
() };
System\Windows\Forms\ListViewItemSelectionChangedEventArgsTests.cs (2)
12
yield return new object[] { new
ListViewItem
(), -1, true };
13
yield return new object[] { new
ListViewItem
(), 0, true };
System\Windows\Forms\ListViewItemTests.cs (47)
15
ListViewItem item =
new
();
54
ListViewItem item =
new
(subItems, imageKey, foreColor, backColor, font, group);
92
ListViewItem item =
new
(subItems, imageIndex, foreColor, backColor, font, group);
130
ListViewItem item =
new
(subItems, imageKey, foreColor, backColor, font);
168
ListViewItem item =
new
(subItems, imageIndex, foreColor, backColor, font);
205
ListViewItem item =
new
(subItems, imageKey, group);
242
ListViewItem item =
new
(subItems, imageIndex, group);
280
ListViewItem item =
new
(subItems, imageKey, group);
318
ListViewItem item =
new
(subItems, imageIndex, group);
355
ListViewItem item =
new
(text, imageKey, group);
393
ListViewItem item =
new
(text, imageIndex, group);
431
ListViewItem item =
new
(subItems, imageKey);
468
ListViewItem item =
new
(subItems, imageIndex);
506
ListViewItem item =
new
(subItems, group);
544
ListViewItem item =
new
(subItems, imageKey);
582
ListViewItem item =
new
(subItems, imageIndex);
619
ListViewItem item =
new
(text, group);
657
ListViewItem item =
new
(text, imageKey);
695
ListViewItem item =
new
(text, imageIndex);
732
ListViewItem item =
new
(group);
771
ListViewItem item =
new
(subItems);
801
ListViewItem item =
new
(text);
831
Assert.Throws<ArgumentNullException>("subItems", () => new
ListViewItem
((ListViewItem.ListViewSubItem[])null, "imageKey"));
832
Assert.Throws<ArgumentNullException>("subItems", () => new
ListViewItem
((ListViewItem.ListViewSubItem[])null, 1));
833
Assert.Throws<ArgumentNullException>("subItems", () => new
ListViewItem
((ListViewItem.ListViewSubItem[])null, "imageKey", new ListViewGroup()));
834
Assert.Throws<ArgumentNullException>("subItems", () => new
ListViewItem
((ListViewItem.ListViewSubItem[])null, 0, new ListViewGroup()));
841
Assert.Throws<ArgumentNullException>("subItems", () => new
ListViewItem
(subItems, "imageKey"));
842
Assert.Throws<ArgumentNullException>("subItems", () => new
ListViewItem
(subItems, 1));
843
Assert.Throws<ArgumentNullException>("subItems", () => new
ListViewItem
(subItems, "imageKey", new ListViewGroup()));
844
Assert.Throws<ArgumentNullException>("subItems", () => new
ListViewItem
(subItems, 1, new ListViewGroup()));
862
ListViewItem item =
new
();
875
ListViewItem item =
new
()
891
ListViewItem item =
new
();
919
ListViewItem item =
new
();
932
ListViewItem item =
new
()
949
ListViewItem item =
new
();
969
ListViewItem item =
new
();
982
ListViewItem item =
new
()
1003
ListViewItem item =
new
();
1018
ListViewItem item =
new
();
1026
ListViewItem item =
new
();
1034
ListViewItem item =
new
();
1044
ListViewItem item =
new
();
1074
ListViewItem item =
new
();
1083
ListViewItem item =
new
();
1093
ListViewItem item =
new
();
1107
ListViewItem item =
new
();
System\Windows\Forms\ListViewSubItemCollectionTests.cs (73)
15
ListViewItem item =
new
();
29
ListViewItem item =
new
();
41
ListViewItem item =
new
();
54
ListViewItem item =
new
();
65
ListViewItem item =
new
();
81
ListViewItem item =
new
();
92
ListViewItem item =
new
();
103
ListViewItem item =
new
();
116
ListViewItem item =
new
();
127
ListViewItem item =
new
();
143
ListViewItem item =
new
();
156
ListViewItem item =
new
();
171
ListViewItem item =
new
();
187
ListViewItem item =
new
();
198
ListViewItem item =
new
();
213
ListViewItem item =
new
();
227
ListViewItem item =
new
();
245
ListViewItem item =
new
();
266
ListViewItem item =
new
();
282
ListViewItem item =
new
();
290
ListViewItem item =
new
();
303
ListViewItem item =
new
();
311
ListViewItem item =
new
();
326
ListViewItem item =
new
();
345
ListViewItem item =
new
();
375
ListViewItem item =
new
();
396
ListViewItem item =
new
();
415
ListViewItem item =
new
();
425
ListViewItem item =
new
();
443
ListViewItem item =
new
();
453
ListViewItem item =
new
();
466
ListViewItem item =
new
();
483
ListViewItem item =
new
();
499
ListViewItem item =
new
();
509
ListViewItem item =
new
();
523
ListViewItem item =
new
();
534
ListViewItem item =
new
();
547
ListViewItem item =
new
();
564
ListViewItem item =
new
();
584
ListViewItem item =
new
();
594
ListViewItem item =
new
();
608
ListViewItem item =
new
();
619
ListViewItem item =
new
();
632
ListViewItem item =
new
();
647
ListViewItem item =
new
();
660
ListViewItem item =
new
();
668
ListViewItem item =
new
();
683
ListViewItem item =
new
();
693
ListViewItem item =
new
();
701
ListViewItem item =
new
();
723
ListViewItem item =
new
();
743
ListViewItem item =
new
();
755
ListViewItem item =
new
();
804
ListViewItem item =
new
();
817
ListViewItem item =
new
();
832
ListViewItem item =
new
();
855
ListViewItem item =
new
();
868
ListViewItem item =
new
();
878
ListViewItem listViewItem =
new
();
891
ListViewItem listViewItem =
new
();
901
ListViewItem listViewItem =
new
();
911
ListViewItem listViewItem =
new
();
927
ListViewItem listViewItem =
new
();
938
ListViewItem listViewItem =
new
();
949
ListViewItem listViewItem =
new
();
972
ListViewItem listViewItem =
new
();
985
ListViewItem listViewItem =
new
();
1016
ListViewItem listViewItem =
new
();
1035
ListViewItem listViewItem =
new
();
1051
ListViewItem listViewItem =
new
();
1073
ListViewItem listViewItem =
new
();
1092
ListViewItem listViewItem =
new
();
1111
ListViewItem listViewItem =
new
("Test 1");
System\Windows\Forms\ListViewSubItemConverterTests.cs (1)
50
ListViewItem item =
new
();
System\Windows\Forms\ListViewSubItemTests.cs (27)
29
yield return new object[] { new
ListViewItem
(), string.Empty, string.Empty };
30
yield return new object[] { new
ListViewItem
(), "reasonable", "reasonable" };
31
yield return new object[] { new
ListViewItem
() { BackColor = Color.Yellow, ForeColor = Color.Yellow, Font = SystemFonts.StatusFont }, "reasonable", "reasonable" };
33
ListViewItem item =
new
();
55
yield return new object[] { new
ListViewItem
(), string.Empty, Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue, string.Empty };
56
yield return new object[] { new
ListViewItem
(), "reasonable", Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue, "reasonable" };
57
yield return new object[] { new
ListViewItem
() { BackColor = Color.Yellow, ForeColor = Color.Yellow, Font = SystemFonts.StatusFont }, string.Empty, Color.Red, Color.Blue, SystemFonts.MenuFont, Color.Red, Color.Blue, string.Empty };
59
ListViewItem item =
new
();
85
ListViewItem item =
new
();
99
ListViewItem item =
new
()
118
ListViewItem item =
new
()
167
ListViewItem item =
new
()
187
ListViewItem item =
new
()
206
ListViewItem item =
new
();
221
ListViewItem item =
new
();
235
ListViewItem item =
new
()
254
ListViewItem item =
new
()
292
ListViewItem item =
new
()
312
ListViewItem item =
new
()
334
ListViewItem item =
new
();
348
ListViewItem item =
new
()
367
ListViewItem item =
new
()
418
ListViewItem item =
new
()
438
ListViewItem item =
new
()
457
ListViewItem item =
new
();
503
ListViewItem item =
new
();
533
yield return new object[] { new
ListViewItem
() };
System\Windows\Forms\ListViewTests.cs (77)
870
ListViewItem item1 =
new
()
874
ListViewItem item2 =
new
();
1043
ListViewItem item1 =
new
()
1047
ListViewItem item2 =
new
();
1218
yield return new object[] { new
ListViewItem
(), false };
1244
ListViewItem value =
new
();
1286
ListViewItem value =
new
();
4084
ListViewItem item1 =
new
();
4085
ListViewItem item2 =
new
();
4108
ListViewItem item1 =
new
();
4109
ListViewItem item2 =
new
();
4155
ListViewItem item =
new
();
4184
ListViewItem item =
new
();
4223
ListViewItem item1 =
new
();
4244
ListViewItem item1 =
new
();
4413
ListViewItem listItem1 =
new
("Test 1");
4481
control.Items.Add(new
ListViewItem
());
4482
control.Items.Add(new
ListViewItem
());
4501
ListViewItem item1 =
new
()
4505
ListViewItem item2 =
new
()
4532
ListViewItem item1 =
new
()
4536
ListViewItem item2 =
new
()
4570
ListViewItem item1 =
new
(group1)
4574
ListViewItem item2 =
new
(group2)
4578
ListViewItem item3 =
new
(group3)
4625
0 => new
ListViewItem
(group) { Selected = true },
4626
_ => new
ListViewItem
(group),
4650
ListViewItem item1 =
new
();
4651
ListViewItem item2 =
new
();
4719
ListViewItem listItem =
new
();
4867
ListViewItem listViewItem =
new
();
4880
ListViewItem listViewItem1 =
new
();
4881
ListViewItem listViewItem2 =
new
();
4882
ListViewItem listViewItem3 =
new
();
4899
ListViewItem listViewItem =
new
();
4912
ListViewItem listViewItem =
new
();
4929
ListViewItem listViewItem =
new
();
4943
ListViewItem listViewItem =
new
();
4952
ListViewItem listViewItem =
new
();
4961
ListViewItem listViewItem =
new
();
4975
ListViewItem listViewItem =
new
();
5003
ListViewItem listViewItem1 =
new
("1");
5004
ListViewItem listViewItem2 =
new
("2");
5005
ListViewItem listViewItem3 =
new
("3");
5006
ListViewItem listViewItem4 =
new
("4");
5007
ListViewItem listViewItem5 =
new
("5");
5008
ListViewItem listViewItem6 =
new
("6");
5009
ListViewItem listViewItem7 =
new
("7");
5010
ListViewItem listViewItem8 =
new
("8");
5011
ListViewItem listViewItem9 =
new
("9");
5059
ListViewItem listViewItem1 =
new
("Item1");
5060
ListViewItem listViewItem2 =
new
("item2") { ImageKey = "SmallABlue.bmp" };
5061
ListViewItem listViewItem3 =
new
("item3");
5062
ListViewItem listViewItem4 =
new
("Items 4") { ImageKey = "SmallA.bmp" };
5063
ListViewItem listViewItem5 =
new
("Items 5");
5064
ListViewItem listViewItem6 =
new
("Items 6") { ImageKey = "SmallABlue.bmp" };
5065
ListViewItem listViewItem7 =
new
("Items 7") { ImageKey = "SmallA.bmp" };
5066
ListViewItem listViewItem8 =
new
("Items 8");
5067
ListViewItem listViewItem9 =
new
("Items 9");
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"));
5241
{
new
("Item 1") },
5282
ListViewItem listItem1 =
new
("Item 1");
5436
ListViewItem item =
new
("Test");
5478
listView.Items.Add(new
ListViewItem
("Group Item 0"));
5797
listView.Items.Add(new
ListViewItem
("Test 1"));
5798
listView.Items.Add(new
ListViewItem
("Test 2"));
5813
listView.Items.Add(new
ListViewItem
("Test 1"));
5814
listView.Items.Add(new
ListViewItem
("Test 2"));
5829
listView.Items.Add(new
ListViewItem
("Test 1") { Name = "Test 1" });
5830
listView.Items.Add(new
ListViewItem
("Test 2"));
5845
listView.Items.Add(new
ListViewItem
("Test 1"));
5846
listView.Items.Add(new
ListViewItem
("Test 2"));
6184
ListViewItem listItem1 =
new
("Test Item 1");
6185
ListViewItem listItem2 =
new
("Test Item 2");
System\Windows\Forms\RetrieveVirtualItemEventArgsTests.cs (1)
23
yield return new object[] { new
ListViewItem
() };
System.Windows.Forms.UI.IntegrationTests (5)
DragDropTests.cs (1)
308
listViewItem =
new
("listViewItem1")
ListViewTests.cs (4)
51
ListViewItem item1 =
new
("g1-1") { Group = group };
52
ListViewItem item2 =
new
("g1-2") { Group = group };
53
ListViewItem item3 =
new
("g1-3") { Group = group };
556
ListViewItem listViewItem =
new
("Test");
TrimTestBinaryDeserialization (1)
Form1.Designer.cs (1)
33
ListViewItem listViewItem1 = new
ListViewItem
("This is a ListViewItem with an image", 0);
WinFormsControlsTest (13)
ListViewTest.cs (10)
44
0 => new
ListViewItem
(TestItems[0]),
45
1 => new
ListViewItem
(TestItems[1]),
46
2 => new
ListViewItem
(TestItems[2]),
82
ListViewItem item1 =
new
("item1", 0)
90
ListViewItem item2 =
new
("item2", 1);
94
ListViewItem item3 =
new
("item3")
153
listView1.Items.Add(new
ListViewItem
166
listView1.Items.Add(new
ListViewItem
193
listView1.Items.Add(new
ListViewItem
252
ListViewItem item = new
ListViewItem
MultipleControls.cs (3)
44
ListViewItem item1 =
new
("item1", 0)
52
ListViewItem item2 =
new
("item2", 1);
56
ListViewItem item3 =
new
("item3", 0)
1201 references to ListViewItem
Accessibility_Core_App (6)
CommonControl1.Designer.cs (5)
31
System.Windows.Forms.
ListViewItem
listViewItem1 = new("1");
32
System.Windows.Forms.
ListViewItem
listViewItem2 = new("2");
33
System.Windows.Forms.
ListViewItem
listViewItem3 = new("3");
34
System.Windows.Forms.
ListViewItem
listViewItem4 = new("4");
382
this.listView1.Items.AddRange(new System.Windows.Forms.
ListViewItem
[] {
DataBindingExample.cs (1)
103
ListViewItem
item = new(itemName, i);
System.Windows.Forms (276)
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (3)
18
ListViewItem
item,
38
public
ListViewItem
Item { get; }
103
ListViewItem
.ListViewSubItem subItem = Item.SubItems[0];
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (4)
19
ListViewItem
? item,
20
ListViewItem
.ListViewSubItem? subItem,
59
public
ListViewItem
? Item { get; }
64
public
ListViewItem
.ListViewSubItem? SubItem { get; }
System\Windows\Forms\Controls\ListView\LabelEditEventArgs.cs (6)
13
/// class with the specified index to the <see cref="
ListViewItem
"/>
22
/// class with the specified index to the <see cref="
ListViewItem
"/>
23
/// being edited and the new text for the label of the <see cref="
ListViewItem
"/>.
32
/// Gets the zero-based index of the <see cref="
ListViewItem
"/> containing
38
/// Gets the new text assigned to the label of the <see cref="
ListViewItem
"/>.
44
/// <see cref="
ListViewItem
"/> should be canceled.
System\Windows\Forms\Controls\ListView\ListView.CheckedIndexCollection.cs (2)
37
foreach (
ListViewItem
item in _owner.Items)
81
ListViewItem
item = _owner.Items[i];
System\Windows\Forms\Controls\ListView\ListView.CheckedListViewItemCollection.cs (12)
44
private
ListViewItem
[] ItemArray
48
ListViewItem
[] items = new
ListViewItem
[Count];
65
public
ListViewItem
this[int index]
99
public virtual
ListViewItem
? this[string? key]
159
public bool Contains(
ListViewItem
? item)
183
if (item is
ListViewItem
listViewItem)
206
public int IndexOf(
ListViewItem
item)
213
ListViewItem
[] items = ItemArray;
280
if (item is
ListViewItem
listViewItem)
335
ListViewItem
[] items = ItemArray;
342
return Array.Empty<
ListViewItem
>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListView.cs (73)
17
using static System.Windows.Forms.
ListViewItem
;
120
internal
ListViewItem
? _selectedItem;
136
private readonly Dictionary<int,
ListViewItem
> _listItemsTable = []; // elements are ListViewItem's
137
private List<
ListViewItem
>? _listViewItems = [];
170
private List<
ListViewItem
>? _savedSelectedItems;
171
private List<
ListViewItem
>? _savedCheckedItems;
176
private
ListViewItem
? _prevHoveredItem;
461
_savedCheckedItems = new List<
ListViewItem
>(CheckedItems.Count);
462
ListViewItem
[] items = new
ListViewItem
[CheckedItems.Count];
478
foreach (
ListViewItem
item in _savedCheckedItems)
506
_savedCheckedItems = new List<
ListViewItem
>(CheckedItems.Count);
507
ListViewItem
[] items = new
ListViewItem
[CheckedItems.Count];
542
foreach (
ListViewItem
item in _savedCheckedItems)
802
public
ListViewItem
? FocusedItem
1708
public
ListViewItem
? TopItem
1753
ListViewItem
? topItem = TopItem;
1891
ListViewItem
lvItem = Items[topIndex];
2219
if (Properties.TryGetValue(s_propDelayedUpdateItems, out List<
ListViewItem
>? newItems))
2355
Properties.AddValue(s_propDelayedUpdateItems, new List<
ListViewItem
>());
2359
internal void CacheSelectedStateForItem(
ListViewItem
lvi, bool selected)
2464
_listItemsTable.TryGetValue((int)lparam1, out
ListViewItem
? x);
2465
_listItemsTable.TryGetValue((int)lparam2, out
ListViewItem
? y);
2753
ListViewItem
item = Items[(int)nmcd->nmcd.dwItemSpec];
3193
public
ListViewItem
? FindItemWithText(string text) => Items.Count == 0
3197
public
ListViewItem
? FindItemWithText(string text, bool includeSubItemsInSearch, int startIndex) =>
3200
public
ListViewItem
? FindItemWithText(string text, bool includeSubItemsInSearch, int startIndex, bool isPrefixSearch)
3208
public
ListViewItem
? FindNearestItem(SearchDirectionHint dir, Point point)
3213
public
ListViewItem
? FindNearestItem(SearchDirectionHint searchDirection, int x, int y)
3228
ListViewItem
? lvi = GetItemAt(x, y);
3267
private unsafe
ListViewItem
? FindItem(bool isTextSearch, string text, bool isPrefixSearch, Point pt, SearchDirectionHint dir, int startIndex, bool includeSubItemsInSearch)
3324
ListViewItem
listViewItem = Items[i];
3396
internal int GetDisplayIndex(
ListViewItem
item, int lastIndex)
3432
foreach (
ListViewItem
listViewItem in _listViewItems)
3472
public
ListViewItem
? GetItemAt(int x, int y)
3481
ListViewItem
? li = null;
3492
internal int GetNativeGroupId(
ListViewItem
item)
3719
ListViewItem
? item = (iItem == -1) ? null : Items[iItem];
3753
private void NotifyAboutGotFocus(
ListViewItem
listViewItem)
3768
private void NotifyAboutLostFocus(
ListViewItem
? listViewItem)
3947
ListViewItem
item = Items[i];
3961
ListViewItem
item = Items[i];
3990
private void InsertItems(int displayIndex,
ListViewItem
[] items, bool checkHosting)
4004
if (_updateCounter > 0 && Properties.TryGetValue(s_propDelayedUpdateItems, out List<
ListViewItem
>? itemList))
4036
ListViewItem
item = items[i];
4086
private unsafe int InsertItemsNative(int index,
ListViewItem
[] items)
4116
ListViewItem
li = items[i];
4310
foreach (
ListViewItem
item in Items)
4319
internal void ListViewItemToolTipChanged(
ListViewItem
item)
4364
ListViewItem
? item = null;
4595
ListViewItem
[]? listViewItemsToAdd = null;
4676
ListViewItem
[] lviArr = new
ListViewItem
[SelectedItems.Count];
4678
_savedSelectedItems = new List<
ListViewItem
>(lviArr.Length);
4688
var items = new
ListViewItem
[tempItems.Count];
4708
if (ShowItemToolTips && Items.Count > 0 && (FocusedItem ?? Items[0]) is
ListViewItem
focusedItem)
4756
ListViewItem
item = e.Item;
4855
ListViewItem
firstSelectedItem = Items[SelectedIndices[0]];
5077
foreach (
ListViewItem
item in group.Items)
5349
internal void UpdateSavedCheckedItems(
ListViewItem
item, bool addItem)
5834
ListViewItem
clickedItem = Items[displayIndex];
5846
foreach (
ListViewItem
item in SelectedItems)
5875
ListViewItem
clickedItem = Items[displayIndex];
6336
foreach (
ListViewItem
listViewItem in Items)
6506
ListViewItem
item = Items[nmlv->iItem];
6521
ListViewItem
item = Items[nmlv->iItem];
6578
ListViewItem
item = Items[indexItem];
6719
ListViewItem
? focusedItem = FocusedItem;
6723
foreach (
ListViewItem
item in SelectedItems)
6752
ListViewItem
lvItem = rVI.Item ?? throw new InvalidOperationException(SR.ListViewVirtualItemRequired);
6814
ListViewItem
lvi = Items[infoTip->iItem];
6923
foreach (
ListViewItem
selectedItem in SelectedItems)
System\Windows\Forms\Controls\ListView\ListView.IconComparer.cs (4)
33
ListViewItem
? currentItem = (
ListViewItem
?)obj1;
34
ListViewItem
? nextItem = (
ListViewItem
?)obj2;
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (5)
51
foreach (
ListViewItem
? item in owningListView.Items)
125
if (child is
ListViewItem
.ListViewItemBaseAccessibleObject itemAccessibleObject)
316
View.Details => ((
ListViewItem
.ListViewItemDetailsAccessibleObject)itemAccessibleObject)
326
if (itemAccessibleObject is
ListViewItem
.ListViewItemDetailsAccessibleObject itemDetailsAccessibleObject)
336
else if (itemAccessibleObject is
ListViewItem
.ListViewItemWithImageAccessibleObject itemIconAccessibleObject)
System\Windows\Forms\Controls\ListView\ListView.ListViewItemCollection.cs (35)
58
public virtual
ListViewItem
this[int index]
76
internal
ListViewItem
? GetItemByIndex(int index)
92
this[index] = value is
ListViewItem
item
101
public virtual
ListViewItem
? this[string key]
127
public virtual
ListViewItem
Add(string? text)
134
if (item is
ListViewItem
listViewItem)
152
public virtual
ListViewItem
Add(string? text, int imageIndex)
154
ListViewItem
item = new(text, imageIndex);
164
public virtual
ListViewItem
Add(
ListViewItem
value)
177
public virtual
ListViewItem
Add(string? text, string? imageKey)
179
ListViewItem
item = new(text, imageKey);
189
public virtual
ListViewItem
Add(string? key, string? text, string? imageKey)
191
ListViewItem
item = new(text, imageKey)
204
public virtual
ListViewItem
Add(string? key, string? text, int imageIndex)
206
ListViewItem
item = new(text, imageIndex)
216
public void AddRange(params
ListViewItem
[] items)
227
var itemArray = new
ListViewItem
[items.Count];
240
public bool Contains(
ListViewItem
item)
246
=> item is
ListViewItem
listViewItem && Contains(listViewItem);
265
public
ListViewItem
[] Find(string key, bool searchAllSubItems)
269
List<
ListViewItem
> foundItems = [];
279
private static void FindInternal(string? key, bool searchAllSubItems, ListViewItemCollection listViewItems, List<
ListViewItem
> foundItems)
316
public int IndexOf(
ListViewItem
item)
330
=> item is
ListViewItem
listViewItem ? IndexOf(listViewItem) : -1;
375
public
ListViewItem
Insert(int index,
ListViewItem
item)
384
public
ListViewItem
Insert(int index, string? text)
389
public
ListViewItem
Insert(int index, string? text, int imageIndex)
396
if (item is
ListViewItem
listViewItem)
408
public
ListViewItem
Insert(int index, string? text, string? imageKey)
411
public virtual
ListViewItem
Insert(int index, string? key, string? text, string? imageKey)
417
public virtual
ListViewItem
Insert(int index, string? key, string? text, int imageIndex)
428
public virtual void Remove(
ListViewItem
item)
458
if (item is
ListViewItem
listViewItem)
System\Windows\Forms\Controls\ListView\ListView.ListViewItemCollection.IInnerList.cs (10)
17
ListViewItem
this[int index] { get; set; }
19
ListViewItem
Add(
ListViewItem
item);
20
void AddRange(params
ListViewItem
[] items);
22
bool Contains(
ListViewItem
item);
25
int IndexOf(
ListViewItem
item);
26
ListViewItem
Insert(int index,
ListViewItem
item);
27
void Remove(
ListViewItem
item);
29
ListViewItem
? GetItemByIndex(int index)
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (17)
35
public
ListViewItem
this[int displayIndex]
59
public
ListViewItem
? GetItemByIndex(int index) =>
62
private
ListViewItem
? GetItemByIndexInternal(int index, [NotNullWhen(true)] bool throwInVirtualMode)
86
_owner._listItemsTable.TryGetValue(DisplayIndexToID(index), out
ListViewItem
? item);
97
public
ListViewItem
Add(
ListViewItem
value)
128
public void AddRange(params
ListViewItem
[] values)
234
ListViewItem
item = _owner.Items[i];
285
ListViewItem
item = _owner.Items[i];
307
public bool Contains(
ListViewItem
item)
312
return _owner._listItemsTable.TryGetValue(item._id, out
ListViewItem
? itemOut)
322
public
ListViewItem
Insert(int index,
ListViewItem
item)
364
public int IndexOf(
ListViewItem
item)
378
public void Remove(
ListViewItem
item)
454
ListViewItem
[] items = new
ListViewItem
[_owner._itemCount];
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (15)
27
private
ListViewItem
[] SelectedItemArray
35
ListViewItem
[] lvitems = new
ListViewItem
[cnt];
64
ListViewItem
[] cloned = new
ListViewItem
[_owner._savedSelectedItems.Count];
112
public
ListViewItem
this[int index]
152
public virtual
ListViewItem
? this[string? key]
272
ListViewItem
[] items = SelectedItemArray;
292
public bool Contains(
ListViewItem
? item)
309
if (item is
ListViewItem
listViewItem)
339
ListViewItem
[] items = SelectedItemArray;
346
return Array.Empty<
ListViewItem
>().GetEnumerator();
350
public int IndexOf(
ListViewItem
? item)
357
ListViewItem
[] items = SelectedItemArray;
376
if (item is
ListViewItem
listViewItem)
System\Windows\Forms\Controls\ListView\ListViewGroup.cs (5)
381
ListViewItem
[] items = new
ListViewItem
[count];
384
items[i] = (
ListViewItem
)info.GetValue($"Item{i}", typeof(
ListViewItem
))!;
471
info.AddValue($"Item{i}", Items[i], typeof(
ListViewItem
));
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (7)
198
internal IReadOnlyList<
ListViewItem
> GetVisibleItems()
200
List<
ListViewItem
> visibleItems = [];
203
foreach (
ListViewItem
? listViewItem in _owningListView.Items)
214
foreach (
ListViewItem
listViewItem in _owningGroup.Items)
246
IReadOnlyList<
ListViewItem
> visibleItems = GetVisibleItems();
261
IReadOnlyList<
ListViewItem
> visibleItems = GetVisibleItems();
277
IReadOnlyList<
ListViewItem
> visibleItems = GetVisibleItems();
System\Windows\Forms\Controls\ListView\ListViewGroupCollection.cs (2)
177
ListViewItem
item = group.Items[i];
269
foreach (
ListViewItem
item in group.Items)
System\Windows\Forms\Controls\ListView\ListViewGroupConverter.cs (4)
23
if (sourceType == typeof(string) && context is not null && context.Instance is
ListViewItem
)
42
if (destinationType == typeof(string) && context is not null && context.Instance is
ListViewItem
)
60
if (context.Instance is
ListViewItem
item && item.ListView is not null)
115
if (context is not null && context.Instance is
ListViewItem
item && item.ListView is not null)
System\Windows\Forms\Controls\ListView\ListViewGroupItemCollection.cs (14)
11
private List<
ListViewItem
>? _items;
20
private List<
ListViewItem
> Items => _items ??= [];
26
public
ListViewItem
this[int index]
40
public
ListViewItem
Add(
ListViewItem
value)
49
public void AddRange(params
ListViewItem
[] items)
64
private void CheckListViewItem(
ListViewItem
item)
82
public bool Contains(
ListViewItem
item) => Items.Contains(item);
88
public int IndexOf(
ListViewItem
item) => Items.IndexOf(item);
90
public
ListViewItem
Insert(int index,
ListViewItem
item)
99
private static void MoveToGroup(
ListViewItem
item, ListViewGroup? newGroup)
110
public void Remove(
ListViewItem
item)
123
private static void UpdateNativeListViewItem(
ListViewItem
item)
System\Windows\Forms\Controls\ListView\ListViewHitTestInfo.cs (4)
14
public ListViewHitTestInfo(
ListViewItem
? hitItem,
ListViewItem
.ListViewSubItem? hitSubItem, ListViewHitTestLocations hitLocation)
29
public
ListViewItem
? Item { get; }
34
public
ListViewItem
.ListViewSubItem? SubItem { get; }
System\Windows\Forms\Controls\ListView\ListViewItem.cs (4)
903
ListViewItem
newItem;
904
if (clonedType == typeof(
ListViewItem
))
910
newItem = (
ListViewItem
)Activator.CreateInstance(clonedType)!;
953
public
ListViewItem
? FindNearestItem(SearchDirectionHint searchDirection)
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (4)
36
ListViewItem
? neighboringItem = FindNearestItem(searchDirectionHint);
89
ListViewItem
item = _listView.Items[index];
107
private static Rectangle GetDetailsListRectangle(Point point,
ListViewItem
item, Rectangle itemBounds)
118
private Rectangle GetTileRectangle(Point point,
ListViewItem
item, Rectangle itemBounds)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (3)
24
private protected readonly
ListViewItem
_owningItem;
26
public ListViewItemBaseAccessibleObject(
ListViewItem
owningItem)
37
=> $"{nameof(
ListViewItem
)}-{CurrentIndex}";
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
16
public ListViewItemDetailsAccessibleObject(
ListViewItem
owningItem) : base(owningItem)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemImageAccessibleObject.cs (2)
14
private readonly
ListViewItem
_owningItem;
16
public ListViewItemImageAccessibleObject(
ListViewItem
owner)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemLargeIconAccessibleObject.cs (1)
10
public ListViewItemLargeIconAccessibleObject(
ListViewItem
owningItem) : base(owningItem)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemListAccessibleObject.cs (1)
13
public ListViewItemListAccessibleObject(
ListViewItem
owningItem) : base(owningItem)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemSmallIconAccessibleObject.cs (1)
10
public ListViewItemSmallIconAccessibleObject(
ListViewItem
owningItem) : base(owningItem)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (1)
14
public ListViewItemTileAccessibleObject(
ListViewItem
owningItem) : base(owningItem)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemWithImageAccessibleObject.cs (1)
19
public ListViewItemWithImageAccessibleObject(
ListViewItem
owningItem) : base(owningItem)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (3)
20
internal
ListViewItem
? _owner;
40
public ListViewSubItem(
ListViewItem
? owner, string? text)
46
public ListViewSubItem(
ListViewItem
? owner, string? text, Color foreColor, Color backColor, Font font)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (2)
17
private readonly
ListViewItem
_owningItem;
23
public ListViewSubItemAccessibleObject(ListViewSubItem? owningSubItem,
ListViewItem
owningItem)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (2)
14
private readonly
ListViewItem
_owner;
21
public ListViewSubItemCollection(
ListViewItem
owner)
System\Windows\Forms\Controls\ListView\ListViewItemConverter.cs (9)
45
if (destinationType == typeof(InstanceDescriptor) && value is
ListViewItem
item)
55
ctor = typeof(
ListViewItem
).GetConstructor([typeof(
ListViewItem
.ListViewSubItem[]), typeof(string)]);
57
ListViewItem
.ListViewSubItem[] subItemArray = new
ListViewItem
.ListViewSubItem[item.SubItems.Count];
63
ctor = typeof(
ListViewItem
).GetConstructor([typeof(
ListViewItem
.ListViewSubItem[]), typeof(int)]);
65
ListViewItem
.ListViewSubItem[] subItemArray = new
ListViewItem
.ListViewSubItem[item.SubItems.Count];
System\Windows\Forms\Controls\ListView\ListViewItemImageIndexer.cs (6)
8
/// ListViewItemImageIndexer is a class used to support <see cref="
ListViewItem
.ImageIndex"/> and
9
/// <see cref="
ListViewItem
.ImageKey"/>.
13
private readonly
ListViewItem
_owner;
18
/// <param name="item">The <see cref="
ListViewItem
"/> that this object belongs to.</param>
19
public ListViewItemImageIndexer(
ListViewItem
item)
25
/// Gets the <see cref="
ListViewItem
.ImageList"/> associated with the item.
System\Windows\Forms\Controls\ListView\ListViewItemMouseHoverEventArgs.cs (2)
11
public ListViewItemMouseHoverEventArgs(
ListViewItem
? item)
16
public
ListViewItem
? Item { get; }
System\Windows\Forms\Controls\ListView\ListViewItemSelectionChangedEventArgs.cs (2)
14
public ListViewItemSelectionChangedEventArgs(
ListViewItem
? item, int itemIndex, bool isSelected)
24
public
ListViewItem
? Item { get; }
System\Windows\Forms\Controls\ListView\ListViewLabelEditAccessibleObject.cs (1)
6
using static System.Windows.Forms.
ListViewItem
.ListViewSubItem;
System\Windows\Forms\Controls\ListView\ListViewSubItemConverter.cs (5)
28
if (destinationType == typeof(InstanceDescriptor) && value is
ListViewItem
.ListViewSubItem item)
35
ctor = typeof(
ListViewItem
.ListViewSubItem).GetConstructor(
37
typeof(
ListViewItem
),
55
ctor = typeof(
ListViewItem
.ListViewSubItem).GetConstructor([typeof(
ListViewItem
), typeof(string)]);
System\Windows\Forms\Controls\ListView\RetrieveVirtualItemEventArgs.cs (1)
15
public
ListViewItem
? Item { get; set; }
System\Windows\Forms\ItemCheckedEventArgs.cs (2)
11
public ItemCheckedEventArgs(
ListViewItem
item)
19
public
ListViewItem
Item { get; }
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\ListViewSubItemCollectionEditor.cs (3)
18
private
ListViewItem
.ListViewSubItem _firstSubItem;
32
if (instance is
ListViewItem
.ListViewSubItem item)
74
var subItems = (
ListViewItem
.ListViewSubItemCollection)editValue;
System.Windows.Forms.Design.Tests (4)
EnsureEditorsTests.cs (4)
112
[InlineData(typeof(
ListViewItem
), "ImageIndex", typeof(ImageIndexEditor))]
113
[InlineData(typeof(
ListViewItem
), "ImageKey", typeof(ImageIndexEditor))]
114
[InlineData(typeof(
ListViewItem
), "StateImageIndex", typeof(ImageIndexEditor))]
115
[InlineData(typeof(
ListViewItem
), "SubItems", typeof(ListViewSubItemCollectionEditor))]
System.Windows.Forms.Tests (883)
SerializableAttributeTests.cs (3)
15
typeof(
ListViewItem
).Assembly,
26
{ typeof(
ListViewItem
).FullName },
27
{ typeof(
ListViewItem
.ListViewSubItem).FullName },
SerializableTypesTests.cs (6)
8
using static System.Windows.Forms.
ListViewItem
;
149
var
item = Assert.Single(result.Items) as
ListViewItem
;
163
ListViewItem
listViewItem = new("Item1", 0)
181
ListViewItem
result = BinarySerialization.EnsureDeserialize<
ListViewItem
>(blob);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (52)
7
using static System.Windows.Forms.
ListViewItem
;
87
ListViewItem
item = new();
88
ListViewItem
item2 = new();
117
ListViewItem
item = new();
118
ListViewItem
item2 = new();
141
ListViewItem
item = new();
142
ListViewItem
item2 = new();
268
ListViewItem
listViewItem1 = new("Test item 1");
269
ListViewItem
listViewItem2 = new("Test item 2");
391
ListViewItem
listViewItem1 = new("Test item 1");
392
ListViewItem
listViewItem2 = new("Test item 2");
393
ListViewItem
listViewItem3 = new("Test item 3");
514
ListViewItem
listViewItem1 = new("Test item 1");
515
ListViewItem
listViewItem2 = new("Test item 2");
516
ListViewItem
listViewItem3 = new("Test item 3");
585
ListViewItem
listViewItem1 = new("Test item 1");
586
ListViewItem
listViewItem2 = new("Test item 2");
587
ListViewItem
listViewItem3 = new("Test item 3");
640
ListViewItem
listViewItem1 = new("Test item 1");
641
ListViewItem
listViewItem2 = new("Test item 2");
642
ListViewItem
listViewItem3 = new("Test item 3");
720
ListViewItem
listViewItem1 = new("Test item 1");
721
ListViewItem
listViewItem2 = new("Test item 2");
722
ListViewItem
listViewItem3 = new("Test item 3");
854
ListViewItem
listViewItem1 = new("Test item 1");
855
ListViewItem
listViewItem2 = new("Test item 2");
856
ListViewItem
listViewItem3 = new("Test item 3");
924
ListViewItem
listItem1 = new(listGroup1);
925
ListViewItem
listItem2 = new();
926
ListViewItem
listItem3 = new(listGroup2);
927
ListViewItem
listItem4 = new(listGroup2);
957
ListViewItem
listItem1 = new();
975
ListViewItem
listItem1 = new();
1013
ListViewItem
listItem1 = new(["Item 1", "Item A"], -1);
1014
ListViewItem
listItem2 = new("Group item 2");
1015
ListViewItem
listItem3 = new("Item 3");
1016
ListViewItem
listItem4 = new(["Item 4", "Item B"], -1);
1059
ListViewItem
listItem1 = new();
1090
ListViewItem
listItem1 = new();
1392
ListViewItem
listItem1 = new(["Test Item 1", "Item A"], -1, listViewGroup);
1393
ListViewItem
listItem2 = new("Group item 2", listViewGroup);
1394
ListViewItem
listItem3 = new("Item 3");
1395
ListViewItem
listItem4 = new(["Test Item 4", "Item B", "Item C", "Item D"], -1);
1488
ListViewItem
listViewItem1 = new();
1489
ListViewItem
listViewItem2 = new();
1573
ListViewItem
listViewItem1 = new();
1574
ListViewItem
listViewItem2 = new();
1674
ListViewItem
listViewItem1 = new();
1675
ListViewItem
listViewItem2 = new();
1730
ListViewItem
listViewItem1 = new();
1731
ListViewItem
listViewItem2 = new();
1732
ListViewItem
listViewItem3 = new();
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (26)
279
ListViewItem
listItem1 = new("Item1");
280
ListViewItem
listItem2 = new("Item2");
388
ListViewItem
itemWithoutListView1 = new(groups[1]);
389
ListViewItem
itemWithoutListView2 = new(groups[1]);
666
ListViewItem
listViewItem = new("Test item", listViewGroup);
797
ListViewItem
item1 = new("Item 1", group1);
798
ListViewItem
item2 = new("Item 2", group2);
799
ListViewItem
item3 = new("Item 2", group3);
800
listView.Items.AddRange((
ListViewItem
[])[item1, item2, item3]);
889
ListViewItem
listViewItem1 = new();
890
ListViewItem
listViewItem2 = new();
1239
ListViewItem
listViewItem1 = new();
1240
ListViewItem
listViewItem2 = new();
1241
ListViewItem
listViewItem3 = new();
1264
ListViewItem
listItem1 = new(listGroup1);
1265
ListViewItem
listItem2 = new(listGroup1);
1266
ListViewItem
listItem3 = new();
1329
ListViewItem
item = new("Test")
1402
ListViewItem
listViewInvisibleItem1 = new("Invisible item 1");
1403
ListViewItem
listViewVisibleItem1 = new("Visible item 1");
1404
ListViewItem
listViewInvisibleItem2 = new("Invisible item 1");
1405
ListViewItem
listViewVisibleItem2 = new("Visible item 1");
1408
listView.Items.AddRange((
ListViewItem
[])[listViewVisibleItem1, listViewVisibleItem2]);
1409
listViewGroup.Items.AddRange((
ListViewItem
[])
1431
ListViewItem
listViewItem1 = new("Test item 1");
1439
ListViewItem
listViewItem2 = new("Test item 2");
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (42)
7
using static System.Windows.Forms.
ListViewItem
;
17
ListViewItem
listItem = new();
21
ConstructorInfo ctor = type.GetConstructor([typeof(
ListViewItem
)]);
27
ListViewItem
itemWithoutList = new();
36
ListViewItem
listItem = new();
76
ListViewItem
listViewItem1 = new();
77
ListViewItem
listViewItem2 = new(listviewGroup);
94
ListViewItem
listItem = new("ListItem");
565
ListViewItem
listItem1 = new(
571
ListViewItem
listItem2 = new(
577
ListViewItem
listItem3 = new(
655
ListViewItem
listItem1 = new(["Test A", "Alpha"], -1);
699
ListViewItem
listItem1 = new(["Test A", "Alpha"], -1);
783
private void AddItemToListView(ListView listView,
ListViewItem
listViewItem, bool virtualMode)
843
ListViewItem
listViewItem = new("Item");
891
ListViewItem
listViewItem = new("Item");
926
ListViewItem
listViewItem = new("Item");
1061
((
ListViewItem
.ListViewItemDetailsAccessibleObject)accessibleObject1).GetDetailsSubItemOrFake(2),
1067
((
ListViewItem
.ListViewItemDetailsAccessibleObject)accessibleObject2).GetDetailsSubItemOrFake(2),
1138
ListViewItem
listItem1 = new("Item 1");
1139
ListViewItem
listItem2 = new("Item 2");
1176
listView.Items.AddRange((
ListViewItem
[])[listItem1, listItem2]);
1197
ListViewItem
listItem1 = new(["Test Item 1", "Item A"], -1);
1198
ListViewItem
listItem2 = new("Group item 2");
1199
ListViewItem
listItem3 = new("Item 3");
1200
ListViewItem
listItem4 = new(["Test Item 4", "Item B", "Item C", "Item D"], -1);
1257
ListViewItem
listViewInvisibleItem1 = new("Invisible item 1");
1258
ListViewItem
listViewVisibleItem1 = new("Visible item 1");
1259
ListViewItem
listViewInvisibleItem2 = new("Invisible item 1");
1260
ListViewItem
listViewVisibleItem2 = new("Visible item 1");
1263
listView.Items.AddRange((
ListViewItem
[])[listViewVisibleItem1, listViewVisibleItem2]);
1264
listViewGroup.Items.AddRange((
ListViewItem
[])
1624
ListViewItem
listViewItem = new("Item 1", imageIndex: hasImage ? 0 : -1);
1846
ListViewItem
item = new("ListItem");
1860
ListViewItem
item = new("ListItem");
1874
ListViewItem
item = new("ListItem");
1888
ListViewItem
item = new("ListItem");
1902
ListViewItem
item = new("ListItem");
1912
private static void EnforceAccessibleObjectCreation(
ListViewItem
listViewItem)
1928
ListViewItem
listViewItem1 = new("Item1");
1929
ListViewItem
listViewItem2 = new("Item2");
1930
ListViewItem
listViewItem3 = new("Item3");
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemBaseAccessibleObjectTests.cs (29)
7
using static System.Windows.Forms.
ListViewItem
;
23
ListViewItem
item = new();
34
ListViewItem
item = new();
45
ListViewItem
item = new();
58
ListViewItem
item = new();
70
ListViewItem
item = new() { Selected = isSelected };
81
ListViewItem
item = new();
98
ListViewItem
item = new();
116
ListViewItem
item = new();
133
ListViewItem
item = new();
151
ListViewItem
item = new();
165
control.Items.AddRange((
ListViewItem
[])[new(), new(), new()]);
181
ListViewItem
item = new();
200
ListViewItem
item = new();
218
ListViewItem
item = new();
231
ListViewItem
item = new();
244
ListViewItem
item = new();
257
ListViewItem
item = new();
270
ListViewItem
item = new();
286
ListViewItem
item = new();
302
ListViewItem
item = new();
318
ListViewItem
item = new()
339
ListViewItem
item = new();
350
ListViewItem
item = new();
363
ListViewItem
item = new() { Checked = isChecked };
376
ListViewItem
item = new() { Checked = isChecked };
393
ListViewItem
item = new();
397
string expected = $"{nameof(
ListViewItem
)}-{accessibleObject.CurrentIndex}";
406
public SubListViewItemBaseAccessibleObject(
ListViewItem
owningItem) : base(owningItem)
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (12)
6
using static System.Windows.Forms.
ListViewItem
;
22
ListViewItem
item = new();
37
ListViewItem
item = new();
53
ListViewItem
item = new();
69
ListViewItem
item = new();
87
ListViewItem
item = new();
100
ListViewItem
item = new();
115
ListViewItem
item = new();
151
ListViewItem
listViewItem = new("1", 0);
166
ListViewItem
listViewItem1 = new(["Item1", "sub1", "sub2"], 0);
167
ListViewItem
listViewItem2 = new(["Item2", "sub1", "sub2"], 0);
170
listView1.Items.AddRange((
ListViewItem
[])[listViewItem1, listViewItem2]);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemImageAccessibleObjectTests.cs (3)
5
using static System.Windows.Forms.
ListViewItem
;
17
ListViewItem
listViewItem = new("Test", 0);
42
ListViewItem
listViewItem = new("Test", 0);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemListAccessibleObjectTests.cs (3)
6
using static System.Windows.Forms.
ListViewItem
;
52
control.Items.AddRange((
ListViewItem
[])[new(), new(), new()]);
71
control.Items.AddRange((
ListViewItem
[])[new(), new(), new()]);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemTileAccessibleObjectTests.cs (1)
4
using static System.Windows.Forms.
ListViewItem
;
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemWithImageAccessibleObjectTests.cs (4)
5
using static System.Windows.Forms.
ListViewItem
;
33
ListViewItem
listViewItem = new("Test", 0);
78
ListViewItem
listViewItem = new("Test", 0);
115
ListViewItem
listViewItem = new("Test", 0);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (72)
7
using static System.Windows.Forms.
ListViewItem
.ListViewSubItem;
17
ListViewItem
listViewItem1 = new(
54
ListViewItem
listViewItem1 = new(
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];
592
ListViewItem
listViewItem = listView.Items[0];
593
ListViewItem
listViewItemInGroup = listView.Items[1];
629
ListViewItem
listViewItem1 = new(
652
ListViewItem
.ListViewSubItem subItem = listViewItem1.SubItems[0];
679
ListViewItem
listViewItem1 = new(
720
ListViewItem
listViewItem1 = new(
753
ListViewItem
listViewItem1 = new(
802
ListViewItem
listItem1 = new("Item 1");
803
ListViewItem
listItem2 = new("Item 2");
840
listView.Items.AddRange((
ListViewItem
[])[listItem1, listItem2]);
855
ListViewItem
listViewItem = new("Test item")
859
ListViewItem
.ListViewSubItem subItem = new(listViewItem, "Test subItem");
914
ListViewItem
listViewItem = new("Test item");
916
ListViewItem
.ListViewSubItem listViewSubItem = new(listViewItem, "Test subItem");
927
ListViewItem
listViewItem = new("Test item");
929
ListViewItem
.ListViewSubItem listViewSubItem = new(listViewItem, "Test subItem");
942
ListViewItem
listViewItem = new("Test item");
944
ListViewItem
.ListViewSubItem listViewSubItem = new(listViewItem, "Test subItem");
971
ListViewItem
listViewItem = new("Test item");
973
ListViewItem
.ListViewSubItem listViewSubItem = new(listViewItem, "Test subItem");
1050
ListViewItem
listViewItem = new();
1051
ListViewItem
.ListViewSubItem listViewSubItem = new();
1062
ListViewItem
listViewItem = new();
1063
ListViewItem
.ListViewSubItem listViewSubItem = new();
1078
ListViewItem
listViewItem = new();
1079
ListViewItem
.ListViewSubItem listViewSubItem = new();
1094
ListViewItem
listViewItem = new();
1095
ListViewItem
.ListViewSubItem listViewSubItem = new();
1110
ListViewItem
listViewItem = new();
1111
ListViewItem
.ListViewSubItem listViewSubItem = new();
1126
ListViewItem
listViewItem = new();
1127
ListViewItem
.ListViewSubItem listViewSubItem = new();
1142
ListViewItem
listViewItem = new();
1143
ListViewItem
.ListViewSubItem listViewSubItem = new();
1158
ListViewItem
listViewItem = new();
1159
ListViewItem
.ListViewSubItem listViewSubItem = new();
1165
listView.Items[0].SubItems[subItemIndex] = new
ListViewItem
.ListViewSubItem();
1171
private static void EnforceAccessibleObjectCreation(
ListViewItem
item)
1175
foreach (
ListViewItem
.ListViewSubItem subItem in item.SubItems)
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (2)
7
using static System.Windows.Forms.
ListViewItem
;
163
ListViewItem
item = new("Test", 0);
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (1)
229
new
ListViewItem
.ListViewSubItem()
System\Windows\Forms\ControlTests.cs (1)
1054
listView1.Items.AddRange((
ListViewItem
[])[new("Foo"), new("Foo"), new("Foo")]);
System\Windows\Forms\DrawListViewItemEventArgsTests.cs (10)
25
ListViewItem
item = new();
85
ListViewItem
listViewItem = new();
91
ListViewItem
subItemsItem = new();
92
subItemsItem.SubItems.Add(new
ListViewItem
.ListViewSubItem());
99
ListViewItem
fullRowSelectListViewItem = new();
100
fullRowSelectListViewItem.SubItems.Add(new
ListViewItem
.ListViewSubItem());
110
public void DrawListViewItemEventArgs_DrawBackground_Invoke_Success(
ListViewItem
item, Rectangle bounds, ListViewItemStates state)
120
public void DrawListViewItemEventArgs_DrawFocusRectangle_HasGraphicsFocused_Success(
ListViewItem
item, Rectangle bounds, ListViewItemStates state)
130
public void DrawListViewItemEventArgs_DrawText_Invoke_Success(
ListViewItem
item, Rectangle bounds, ListViewItemStates state)
140
public void DrawListViewItemEventArgs_DrawText_InvokeTextFormatFlags(
ListViewItem
item, Rectangle bounds, ListViewItemStates state)
System\Windows\Forms\DrawListViewSubItemEventArgsTests.cs (25)
12
yield return new object[] { Rectangle.Empty, null, new
ListViewItem
.ListViewSubItem(), -2, -2, null, ListViewItemStates.Checked - 1 };
13
yield return new object[] { Rectangle.Empty, new ListViewItem(), new
ListViewItem
.ListViewSubItem(), -2, -2, null, ListViewItemStates.Checked - 1 };
15
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), new
ListViewItem
.ListViewSubItem(), -1, -1, new ColumnHeader(), ListViewItemStates.Checked };
16
yield return new object[] { new Rectangle(-1, 2, -3, -4), new ListViewItem(), new
ListViewItem
.ListViewSubItem(), 0, 0, new ColumnHeader(), ListViewItemStates.Focused };
17
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), new
ListViewItem
.ListViewSubItem(), 1, 2, new ColumnHeader(), ListViewItemStates.Checked };
22
public void DrawListViewSubItemEventArgs_Ctor_Graphics_ListViewItem_Rectangle_Int_ListViewItemStates(Rectangle bounds,
ListViewItem
item,
ListViewItem
.ListViewSubItem subItem, int itemIndex, int columnIndex, ColumnHeader header, ListViewItemStates itemState)
41
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewSubItemEventArgs(null, new Rectangle(1, 2, 3, 4), new ListViewItem(), new
ListViewItem
.ListViewSubItem(), -1, 0, new ColumnHeader(), ListViewItemStates.Default));
49
Assert.Throws<ArgumentNullException>("item", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), null, new
ListViewItem
.ListViewSubItem(), -1, 0, new ColumnHeader(), ListViewItemStates.Default));
98
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new
ListViewItem
.ListViewSubItem(), 0, null, ListViewItemStates.Default };
99
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new
ListViewItem
.ListViewSubItem(), 0, null, ListViewItemStates.Checked };
100
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new
ListViewItem
.ListViewSubItem(), 0, null, ListViewItemStates.Focused };
101
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new
ListViewItem
.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Default };
102
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new
ListViewItem
.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Checked };
103
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new
ListViewItem
.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Focused };
104
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new
ListViewItem
.ListViewSubItem(), 0, null, ListViewItemStates.Default };
105
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new
ListViewItem
.ListViewSubItem(), 0, null, ListViewItemStates.Checked };
106
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new
ListViewItem
.ListViewSubItem(), 0, null, ListViewItemStates.Focused };
107
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new
ListViewItem
.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Default };
108
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new
ListViewItem
.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Checked };
109
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new
ListViewItem
.ListViewSubItem(), 0, new ColumnHeader(), ListViewItemStates.Focused };
114
public void DrawListViewSubItemEventArgs_DrawBackground_HasGraphics_Success(Rectangle bounds,
ListViewItem
item,
ListViewItem
.ListViewSubItem subItem, int itemIndex, ColumnHeader header, ListViewItemStates itemState)
124
public void DrawListViewSubItemEventArgs_DrawFocusRectangle_HasGraphics_Success(Rectangle bounds,
ListViewItem
item,
ListViewItem
.ListViewSubItem subItem, int itemIndex, ColumnHeader header, ListViewItemStates itemState)
System\Windows\Forms\ItemCheckedEventArgsTests.cs (1)
18
ListViewItem
listViewItem = new();
System\Windows\Forms\ListView.ListViewItemCollectionTests.cs (9)
15
ListViewItem
child1 = new()
19
ListViewItem
child2 = new()
23
ListViewItem
child3 = new()
28
var grandchild1 = new
ListViewItem
.ListViewSubItem
32
var grandchild2 = new
ListViewItem
.ListViewSubItem
36
var grandchild3 = new
ListViewItem
.ListViewSubItem
71
ListViewItem
child1 = new()
75
ListViewItem
child2 = new()
79
ListViewItem
child3 = new()
System\Windows\Forms\ListViewGroupCollectionTests.cs (9)
76
ListViewItem
item = new();
97
ListViewItem
item = new();
159
ListViewItem
item = new();
407
ListViewItem
item = new();
426
ListViewItem
item = new();
490
ListViewItem
item = new();
768
ListViewItem
item = new();
787
ListViewItem
item = new();
846
ListViewItem
item = new();
System\Windows\Forms\ListViewGroupConverterTests.cs (9)
33
ListViewItem
item1 = new();
40
ListViewItem
item2 = new();
74
ListViewItem
item = new();
92
ListViewItem
item1 = new();
98
ListViewItem
item2 = new();
146
ListViewItem
item1 = new();
153
ListViewItem
item2 = new();
262
ListViewItem
item1 = new();
269
ListViewItem
item2 = new();
System\Windows\Forms\ListViewGroupTests.cs (7)
1350
Assert.Equal(group.Items.Cast<
ListViewItem
>().Select(i => i.Text), result.Items.Cast<
ListViewItem
>().Select(i => i.Text));
1413
Assert.Equal("text", ((
ListViewItem
)info.GetValue("Item0", typeof(
ListViewItem
))).Text);
1429
ListViewItem
listViewItem = new();
1430
ListViewItem
listViewItemGroup = new();
1445
ListViewItem
listViewItem = new();
System\Windows\Forms\ListViewHitTestInfoTests.cs (3)
12
yield return new object[] { new ListViewItem(), new
ListViewItem
.ListViewSubItem(), ListViewHitTestLocations.None - 1 };
17
public void ListViewHitTestInfo_Ctor_ListViewItem_ListViewSubItem_ListViewHitTestLocations(
ListViewItem
hitItem,
ListViewItem
.ListViewSubItem hitSubItem, ListViewHitTestLocations hitTestLocations)
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (24)
5
using static System.Windows.Forms.
ListViewItem
;
19
ListViewItem
listViewItem = new();
41
ListViewItem
listViewItem = new();
63
ListViewItem
listViewItem = new();
86
ListViewItem
listViewItem = new() { ToolTipText = toolTipText };
105
ListViewItem
listViewItem = new();
124
ListViewItem
listViewItem = new();
147
ListViewItem
listViewItem = AssignItemToListView(listView, new ListViewItem(new string('t', 500)));
167
ListViewItem
listViewItem = AssignItemToListView(listView, new ListViewItem(new string('t', 1)));
177
ListViewItem
listViewItem = new(new string('t', 20));
193
ListViewItem
listViewItem = new(new string('t', 10));
209
ListViewItem
listViewItem = new();
220
ListViewItem
listViewItem = AssignItemToListView(listView, new ListViewItem());
229
ListViewItem
listViewItem = AssignItemToListView(listView, new ListViewItem());
645
ListViewItem
listViewItem = new();
672
ListViewItem
listViewItem = new();
700
ListViewItem
listViewItem = new();
738
ListViewItem
listViewItem = new();
748
private
ListViewItem
AssignItemToListView(ListView listView,
ListViewItem
listViewItem)
779
List<
ListViewItem
> listViewItems = [];
783
ListViewItem
listViewItem = new(i.ToString());
800
listView.Items.AddRange((
ListViewItem
[])[.. listViewItems]);
823
private Rectangle GetNativeScreenRectangle(
ListViewItem
listView)
System\Windows\Forms\ListViewItemConverterTests.cs (19)
18
[InlineData(typeof(
ListViewItem
), false)]
39
[InlineData(typeof(
ListViewItem
), false)]
51
var subItem1 = new
ListViewItem
.ListViewSubItem(null, "text1");
52
var subItem2 = new
ListViewItem
.ListViewSubItem(null, "text2");
53
var subItem3 = new
ListViewItem
.ListViewSubItem(null, "text3")
57
var subItem4 = new
ListViewItem
.ListViewSubItem(null, "text4")
61
var subItem5 = new
ListViewItem
.ListViewSubItem(null, "text5")
168
new Type[] { typeof(
ListViewItem
.ListViewSubItem[]), typeof(string) },
169
new object[] { new
ListViewItem
.ListViewSubItem[] { subItem1, subItem2, subItem3, subItem4, subItem5 }, "imageKey" }
174
new Type[] { typeof(
ListViewItem
.ListViewSubItem[]), typeof(int) },
175
new object[] { new
ListViewItem
.ListViewSubItem[] { subItem1, subItem2, subItem3, subItem4, subItem5 }, 1 }
180
new Type[] { typeof(
ListViewItem
.ListViewSubItem[]), typeof(string) },
181
new object[] { new
ListViewItem
.ListViewSubItem[] { subItem1, subItem2, subItem3, subItem4, subItem5 }, "imageKey" }
186
new Type[] { typeof(
ListViewItem
.ListViewSubItem[]), typeof(int) },
187
new object[] { new
ListViewItem
.ListViewSubItem[] { subItem1, subItem2, subItem3, subItem4, subItem5 }, 1 }
255
public void ListViewItemConverter_ConvertTo_InstanceDescriptor_ReturnsExpected(
ListViewItem
value, Type[] parameterTypes, object[] arguments)
259
Assert.Equal(typeof(
ListViewItem
).GetConstructor(parameterTypes), descriptor.MemberInfo);
287
[InlineData(typeof(
ListViewItem
))]
306
ListViewItem
item = new();
System\Windows\Forms\ListViewItemMouseHoverEventArgsTests.cs (1)
17
public void Ctor_ListViewItem(
ListViewItem
item)
System\Windows\Forms\ListViewItemSelectionChangedEventArgsTests.cs (1)
18
public void Ctor_ListViewItem_Int_Bool(
ListViewItem
item, int itemIndex, bool isSelected)
System\Windows\Forms\ListViewItemTests.cs (96)
15
ListViewItem
item = new();
33
ListViewItem
.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<
ListViewItem
.ListViewSubItem>());
54
ListViewItem
item = new(subItems, imageKey, foreColor, backColor, font, group);
72
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
92
ListViewItem
item = new(subItems, imageIndex, foreColor, backColor, font, group);
110
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
130
ListViewItem
item = new(subItems, imageKey, foreColor, backColor, font);
148
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
168
ListViewItem
item = new(subItems, imageIndex, foreColor, backColor, font);
186
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
196
yield return new object[] { Array.Empty<
ListViewItem
.ListViewSubItem>(), null, null, string.Empty, string.Empty };
197
yield return new object[] { new
ListViewItem
.ListViewSubItem[] { new(null, "text") }, string.Empty, null, string.Empty, "text" };
198
yield return new object[] { new
ListViewItem
.ListViewSubItem[] { new(null, "text") }, "imageKey", new ListViewGroup(), "imageKey", "text" };
203
public void ListViewItem_Ctor_ListViewSubItemArray_String_ListViewGroup(
ListViewItem
.ListViewSubItem[] subItems, string imageKey, ListViewGroup group, string expectedImageKey, string expectedText)
205
ListViewItem
item = new(subItems, imageKey, group);
223
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
233
yield return new object[] { Array.Empty<
ListViewItem
.ListViewSubItem>(), 0, null, string.Empty };
234
yield return new object[] { new
ListViewItem
.ListViewSubItem[] { new(null, "text") }, 1, null, "text" };
235
yield return new object[] { new
ListViewItem
.ListViewSubItem[] { new(null, "text") }, -1, new ListViewGroup(), "text" };
240
public void ListViewItem_Ctor_ListViewSubItemArray_Int_ListViewGroup(
ListViewItem
.ListViewSubItem[] subItems, int imageIndex, ListViewGroup group, string expectedText)
242
ListViewItem
item = new(subItems, imageIndex, group);
260
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
280
ListViewItem
item = new(subItems, imageKey, group);
298
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
318
ListViewItem
item = new(subItems, imageIndex, group);
336
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
355
ListViewItem
item = new(text, imageKey, group);
373
ListViewItem
.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<
ListViewItem
.ListViewSubItem>());
393
ListViewItem
item = new(text, imageIndex, group);
411
ListViewItem
.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<
ListViewItem
.ListViewSubItem>());
422
yield return new object[] { Array.Empty<
ListViewItem
.ListViewSubItem>(), null, string.Empty, string.Empty };
423
yield return new object[] { new
ListViewItem
.ListViewSubItem[] { new(null, "text") }, string.Empty, string.Empty, "text" };
424
yield return new object[] { new
ListViewItem
.ListViewSubItem[] { new(null, "text") }, "imageKey", "imageKey", "text" };
429
public void ListViewItem_Ctor_ListViewSubItemArray_String(
ListViewItem
.ListViewSubItem[] subItems, string imageKey, string expectedImageKey, string expectedText)
431
ListViewItem
item = new(subItems, imageKey);
449
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
459
yield return new object[] { Array.Empty<
ListViewItem
.ListViewSubItem>(), 0, string.Empty };
460
yield return new object[] { new
ListViewItem
.ListViewSubItem[] { new(null, "text") }, 1, "text" };
461
yield return new object[] { new
ListViewItem
.ListViewSubItem[] { new(null, "text") }, -1, "text" };
466
public void ListViewItem_Ctor_ListViewSubItemArray_Int(
ListViewItem
.ListViewSubItem[] subItems, int imageIndex, string expectedText)
468
ListViewItem
item = new(subItems, imageIndex);
486
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
506
ListViewItem
item = new(subItems, group);
524
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
544
ListViewItem
item = new(subItems, imageKey);
562
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
582
ListViewItem
item = new(subItems, imageIndex);
600
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
619
ListViewItem
item = new(text, group);
637
ListViewItem
.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<
ListViewItem
.ListViewSubItem>());
657
ListViewItem
item = new(text, imageKey);
675
ListViewItem
.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<
ListViewItem
.ListViewSubItem>());
695
ListViewItem
item = new(text, imageIndex);
713
ListViewItem
.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<
ListViewItem
.ListViewSubItem>());
732
ListViewItem
item = new(group);
750
ListViewItem
.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<
ListViewItem
.ListViewSubItem>());
771
ListViewItem
item = new(subItems);
789
AssertEqualListViewSubItem(subItems, item.SubItems.Cast<
ListViewItem
.ListViewSubItem>().ToArray());
801
ListViewItem
item = new(text);
819
ListViewItem
.ListViewSubItem subItem = Assert.Single(item.SubItems.Cast<
ListViewItem
.ListViewSubItem>());
831
Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((
ListViewItem
.ListViewSubItem[])null, "imageKey"));
832
Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((
ListViewItem
.ListViewSubItem[])null, 1));
833
Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((
ListViewItem
.ListViewSubItem[])null, "imageKey", new ListViewGroup()));
834
Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((
ListViewItem
.ListViewSubItem[])null, 0, new ListViewGroup()));
840
var subItems = new
ListViewItem
.ListViewSubItem[] { null };
862
ListViewItem
item = new();
875
ListViewItem
item = new()
891
ListViewItem
item = new();
919
ListViewItem
item = new();
932
ListViewItem
item = new()
949
ListViewItem
item = new();
969
ListViewItem
item = new();
982
ListViewItem
item = new()
1003
ListViewItem
item = new();
1018
ListViewItem
item = new();
1026
ListViewItem
item = new();
1034
ListViewItem
item = new();
1044
ListViewItem
item = new();
1048
private static void AssertEqualListViewSubItem(string[] expected,
ListViewItem
.ListViewSubItem[] actual)
1050
AssertEqualListViewSubItem(expected?.Select(t => new
ListViewItem
.ListViewSubItem(null, t)).ToArray(), actual);
1053
private static void AssertEqualListViewSubItem(
ListViewItem
.ListViewSubItem[] expected,
ListViewItem
.ListViewSubItem[] actual)
1057
ListViewItem
.ListViewSubItem subItem = Assert.Single(actual.Cast<
ListViewItem
.ListViewSubItem>());
1074
ListViewItem
item = new();
1083
ListViewItem
item = new();
1093
ListViewItem
item = new();
1107
ListViewItem
item = new();
System\Windows\Forms\ListViewSubItemCollectionTests.cs (236)
15
ListViewItem
item = new();
16
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
23
Assert.Throws<ArgumentNullException>("owner", () => new
ListViewItem
.ListViewSubItemCollection(null));
29
ListViewItem
item = new();
30
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
41
ListViewItem
item = new();
42
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
44
var subItem = new
ListViewItem
.ListViewSubItem();
54
ListViewItem
item = new();
55
var collection = new
ListViewItem
.ListViewSubItemCollection(item)
57
new
ListViewItem
.ListViewSubItem()
65
ListViewItem
item = new();
66
var collection = new
ListViewItem
.ListViewSubItemCollection(item)
68
new
ListViewItem
.ListViewSubItem()
71
var subItem = new
ListViewItem
.ListViewSubItem();
81
ListViewItem
item = new();
82
var collection = new
ListViewItem
.ListViewSubItemCollection(item)
84
new
ListViewItem
.ListViewSubItem()
86
Assert.Throws<ArgumentOutOfRangeException>("index", () => collection[index] = new
ListViewItem
.ListViewSubItem());
92
ListViewItem
item = new();
93
var collection = new
ListViewItem
.ListViewSubItemCollection(item)
95
new
ListViewItem
.ListViewSubItem()
103
ListViewItem
item = new();
104
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
106
var subItem = new
ListViewItem
.ListViewSubItem();
116
ListViewItem
item = new();
117
IList collection = new
ListViewItem
.ListViewSubItemCollection(item)
119
new
ListViewItem
.ListViewSubItem()
127
ListViewItem
item = new();
128
IList collection = new
ListViewItem
.ListViewSubItemCollection(item)
130
new
ListViewItem
.ListViewSubItem()
133
var subItem = new
ListViewItem
.ListViewSubItem();
143
ListViewItem
item = new();
144
IList collection = new
ListViewItem
.ListViewSubItemCollection(item)
146
new
ListViewItem
.ListViewSubItem()
156
ListViewItem
item = new();
157
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
171
ListViewItem
item = new();
172
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
173
var subItem1 = new
ListViewItem
.ListViewSubItem();
174
var subItem2 = new
ListViewItem
.ListViewSubItem
187
ListViewItem
item = new();
188
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
189
var subItem = new
ListViewItem
.ListViewSubItem();
198
ListViewItem
item = new();
199
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
202
var subItem = new
ListViewItem
.ListViewSubItem();
207
Assert.Throws<InvalidOperationException>(() => collection.Add(new
ListViewItem
.ListViewSubItem()));
213
ListViewItem
item = new();
214
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
215
var subItem = new
ListViewItem
.ListViewSubItem();
227
ListViewItem
item = new();
228
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
230
var otherCollection = new
ListViewItem
.ListViewSubItemCollection(item);
232
var subItem = new
ListViewItem
.ListViewSubItem();
245
ListViewItem
item = new();
246
var collection = new
ListViewItem
.ListViewSubItemCollection(item)
250
ListViewItem
.ListViewSubItem subItem = Assert.Single(collection.Cast<
ListViewItem
.ListViewSubItem>());
266
ListViewItem
item = new();
267
var collection = new
ListViewItem
.ListViewSubItemCollection(item)
271
ListViewItem
.ListViewSubItem subItem = Assert.Single(collection.Cast<
ListViewItem
.ListViewSubItem>());
282
ListViewItem
item = new();
283
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
284
Assert.Throws<ArgumentNullException>("item", () => collection.Add((
ListViewItem
.ListViewSubItem)null));
290
ListViewItem
item = new();
291
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
292
var subItem = new
ListViewItem
.ListViewSubItem();
303
ListViewItem
item = new();
304
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
311
ListViewItem
item = new();
312
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
313
var subItem1 = new
ListViewItem
.ListViewSubItem(null, "text1");
314
var subItem2 = new
ListViewItem
.ListViewSubItem(null, "text2");
315
var items = new
ListViewItem
.ListViewSubItem[] { subItem1, null, subItem2 };
326
ListViewItem
item = new();
327
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
328
var subItem1 = new
ListViewItem
.ListViewSubItem(null, "text1");
329
var subItem2 = new
ListViewItem
.ListViewSubItem(null, "text2");
330
var subItem3 = new
ListViewItem
.ListViewSubItem(null, "text3");
331
var subItem4 = new
ListViewItem
.ListViewSubItem(null, "text4");
332
var items = new
ListViewItem
.ListViewSubItem[] { subItem1, null, subItem2, subItem3, subItem4 };
345
ListViewItem
item = new();
346
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
347
var subItem1 = new
ListViewItem
.ListViewSubItem(null, "text1");
348
var subItem2 = new
ListViewItem
.ListViewSubItem(null, "text2");
349
var subItem3 = new
ListViewItem
.ListViewSubItem(null, "text3");
350
var subItem4 = new
ListViewItem
.ListViewSubItem(null, "text4");
351
var subItem5 = new
ListViewItem
.ListViewSubItem(null, "text5");
352
var subItem6 = new
ListViewItem
.ListViewSubItem(null, "text6");
353
var subItem7 = new
ListViewItem
.ListViewSubItem(null, "text7");
354
var subItem8 = new
ListViewItem
.ListViewSubItem(null, "text8");
355
var subItem9 = new
ListViewItem
.ListViewSubItem(null, "text8");
356
var items = new
ListViewItem
.ListViewSubItem[] { subItem2, null, subItem3, subItem4, subItem5, subItem6, subItem7, subItem8, subItem9 };
375
ListViewItem
item = new();
376
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
396
ListViewItem
item = new();
397
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
415
ListViewItem
item = new();
416
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
417
Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((
ListViewItem
.ListViewSubItem[])null));
425
ListViewItem
item = new();
426
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
427
var subItem = new
ListViewItem
.ListViewSubItem();
443
ListViewItem
item = new();
444
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
453
ListViewItem
item = new();
454
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
455
var subItem = new
ListViewItem
.ListViewSubItem();
459
Assert.False(collection.Contains(new
ListViewItem
.ListViewSubItem()));
466
ListViewItem
item = new();
467
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
469
Assert.False(collection.Contains(new
ListViewItem
.ListViewSubItem()));
483
ListViewItem
item = new();
484
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
485
var subItem1 = new
ListViewItem
.ListViewSubItem();
486
var subItem2 = new
ListViewItem
.ListViewSubItem
499
ListViewItem
item = new();
500
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
509
ListViewItem
item = new();
510
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
511
var subItem = new
ListViewItem
.ListViewSubItem();
515
Assert.False(collection.Contains(new
ListViewItem
.ListViewSubItem()));
523
ListViewItem
item = new();
524
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
526
Assert.False(collection.Contains(new
ListViewItem
.ListViewSubItem()));
534
ListViewItem
item = new();
535
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
536
var subItem = new
ListViewItem
.ListViewSubItem();
540
Assert.Equal(-1, collection.IndexOf(new
ListViewItem
.ListViewSubItem()));
547
ListViewItem
item = new();
548
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
550
Assert.Equal(-1, collection.IndexOf(new
ListViewItem
.ListViewSubItem()));
564
ListViewItem
item = new();
565
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
566
var subItem1 = new
ListViewItem
.ListViewSubItem();
567
var subItem2 = new
ListViewItem
.ListViewSubItem
584
ListViewItem
item = new();
585
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
594
ListViewItem
item = new();
595
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
596
var subItem = new
ListViewItem
.ListViewSubItem();
600
Assert.Equal(-1, collection.IndexOf(new
ListViewItem
.ListViewSubItem()));
608
ListViewItem
item = new();
609
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
611
Assert.Equal(-1, collection.IndexOf(new
ListViewItem
.ListViewSubItem()));
619
ListViewItem
item = new();
620
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
621
var subItem = new
ListViewItem
.ListViewSubItem();
622
collection.Add(new
ListViewItem
.ListViewSubItem());
632
ListViewItem
item = new();
633
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
636
var subItem = new
ListViewItem
.ListViewSubItem();
641
Assert.Throws<InvalidOperationException>(() => collection.Add(new
ListViewItem
.ListViewSubItem()));
647
ListViewItem
item = new();
648
var collection = new
ListViewItem
.ListViewSubItemCollection(item)
650
new
ListViewItem
.ListViewSubItem()
660
ListViewItem
item = new();
661
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
668
ListViewItem
item = new();
669
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
670
var subItem = new
ListViewItem
.ListViewSubItem();
671
collection.Add(new
ListViewItem
.ListViewSubItem());
683
ListViewItem
item = new();
684
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
693
ListViewItem
item = new();
694
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
695
Assert.Throws<ArgumentOutOfRangeException>("index", () => collection.Insert(index, new
ListViewItem
.ListViewSubItem()));
701
ListViewItem
item = new();
702
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
703
var subItem = new
ListViewItem
.ListViewSubItem();
723
ListViewItem
item = new();
724
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
725
var subItem = new
ListViewItem
.ListViewSubItem();
743
ListViewItem
item = new();
744
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
745
var subItem = new
ListViewItem
.ListViewSubItem();
755
ListViewItem
item = new();
756
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
757
var subItem1 = new
ListViewItem
.ListViewSubItem();
758
var subItem2 = new
ListViewItem
.ListViewSubItem();
759
var subItem3 = new
ListViewItem
.ListViewSubItem();
760
var subItem4 = new
ListViewItem
.ListViewSubItem();
804
ListViewItem
item = new();
805
var collection = new
ListViewItem
.ListViewSubItemCollection(item)
807
new
ListViewItem
.ListViewSubItem()
817
ListViewItem
item = new();
818
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
832
ListViewItem
item = new();
833
var collection = new
ListViewItem
.ListViewSubItemCollection(item);
834
var subItem = new
ListViewItem
.ListViewSubItem
855
ListViewItem
item = new();
856
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
857
var subItem = new
ListViewItem
.ListViewSubItem();
868
ListViewItem
item = new();
869
IList collection = new
ListViewItem
.ListViewSubItemCollection(item);
878
ListViewItem
listViewItem = new();
879
ListViewItem
.ListViewSubItem subItem = new();
891
ListViewItem
listViewItem = new();
901
ListViewItem
listViewItem = new();
911
ListViewItem
listViewItem = new();
912
ListViewItem
.ListViewSubItem subItem1 = new();
913
ListViewItem
.ListViewSubItem subItem2 = new();
927
ListViewItem
listViewItem = new();
938
ListViewItem
listViewItem = new();
949
ListViewItem
listViewItem = new();
950
ListViewItem
.ListViewSubItem subItem1 = new();
951
ListViewItem
.ListViewSubItem subItem2 = new();
952
ListViewItem
.ListViewSubItem oldSubItem = listViewItem.SubItems[0];
972
ListViewItem
listViewItem = new();
973
ListViewItem
.ListViewSubItem subItem = new();
985
ListViewItem
listViewItem = new();
986
ListViewItem
.ListViewSubItem subItem1 = new();
987
ListViewItem
.ListViewSubItem subItem2 = new();
988
ListViewItem
.ListViewSubItem oldSubItem1 = listViewItem.SubItems[0];
989
ListViewItem
.ListViewSubItem oldSubItem2 = new();
1016
ListViewItem
listViewItem = new();
1017
ListViewItem
.ListViewSubItem oldSubItem = listViewItem.SubItems[0];
1018
ListViewItem
.ListViewSubItem subItem = new();
1035
ListViewItem
listViewItem = new();
1036
ListViewItem
.ListViewSubItem subItem = new();
1037
ListViewItem
.ListViewSubItem oldSubItem = listViewItem.SubItems[0];
1051
ListViewItem
listViewItem = new();
1052
ListViewItem
.ListViewSubItem subItem1 = new();
1053
ListViewItem
.ListViewSubItem subItem2 = new();
1054
ListViewItem
.ListViewSubItem defaultSubItem = listViewItem.SubItems[0];
1073
ListViewItem
listViewItem = new();
1074
ListViewItem
.ListViewSubItem oldSubItem = listViewItem.SubItems[0];
1075
ListViewItem
.ListViewSubItem subItem = new();
1092
ListViewItem
listViewItem = new();
1093
ListViewItem
.ListViewSubItem oldSubItem = listViewItem.SubItems[0];
1094
ListViewItem
.ListViewSubItem subItem = new();
1111
ListViewItem
listViewItem = new("Test 1");
1112
ListViewItem
.ListViewSubItem oldSubItem = listViewItem.SubItems[0];
1114
ListViewItem
.ListViewSubItem subItem = new(listViewItem, "Test 2") { Name = "Test 2" };
System\Windows\Forms\ListViewSubItemConverterTests.cs (25)
18
[InlineData(typeof(
ListViewItem
.ListViewSubItem), false)]
22
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
32
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
39
[InlineData(typeof(
ListViewItem
.ListViewSubItem), false)]
44
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
50
ListViewItem
item = new();
53
new
ListViewItem
.ListViewSubItem(item, "text"),
54
new Type[] { typeof(
ListViewItem
), typeof(string) },
60
new
ListViewItem
.ListViewSubItem(null, "text", Color.Red, Color.Blue, SystemFonts.MenuFont),
61
new Type[] { typeof(
ListViewItem
), typeof(string), typeof(Color), typeof(Color), typeof(Font) },
68
public void ListViewSubItemConverter_ConvertTo_InstanceDescriptor_ReturnsExpected(
ListViewItem
.ListViewSubItem value, Type[] parameterTypes, object[] arguments)
70
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
72
Assert.Equal(typeof(
ListViewItem
.ListViewSubItem).GetConstructor(parameterTypes), descriptor.MemberInfo);
81
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
88
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
95
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
100
[InlineData(typeof(
ListViewItem
.ListViewSubItem))]
104
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
105
Assert.Throws<NotSupportedException>(() => converter.ConvertTo(new
ListViewItem
.ListViewSubItem(), destinationType));
111
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
118
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
119
var item = new
ListViewItem
.ListViewSubItem();
126
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
133
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
140
TypeConverter converter = TypeDescriptor.GetConverter(typeof(
ListViewItem
.ListViewSubItem));
System\Windows\Forms\ListViewSubItemTests.cs (59)
16
var subItem = new
ListViewItem
.ListViewSubItem();
33
ListViewItem
item = new();
40
public void ListViewSubItem_Ctor_ListViewItem_String(
ListViewItem
owner, string text, string expectedText)
42
var subItem = new
ListViewItem
.ListViewSubItem(owner, text);
59
ListViewItem
item = new();
66
public void ListViewSubItem_Ctor_ListViewItem_String_Color_Color_Font(
ListViewItem
owner, string text, Color foreColor, Color backColor, Font font, Color expectedForeColor, Color expectedBackColor, string expectedText)
68
var subItem = new
ListViewItem
.ListViewSubItem(owner, text, foreColor, backColor, font);
85
ListViewItem
item = new();
88
var subItem = new
ListViewItem
.ListViewSubItem(item, "text");
99
ListViewItem
item = new()
103
var subItem = new
ListViewItem
.ListViewSubItem(item, "text");
118
ListViewItem
item = new()
123
var subItem = new
ListViewItem
.ListViewSubItem();
142
var subItem = new
ListViewItem
.ListViewSubItem
167
ListViewItem
item = new()
172
var subItem = new
ListViewItem
.ListViewSubItem();
187
ListViewItem
item = new()
191
var subItem = new
ListViewItem
.ListViewSubItem();
206
ListViewItem
item = new();
210
var subItem = new
ListViewItem
.ListViewSubItem(item, "text");
221
ListViewItem
item = new();
224
var subItem = new
ListViewItem
.ListViewSubItem(item, "text");
235
ListViewItem
item = new()
239
var subItem = new
ListViewItem
.ListViewSubItem(item, "text");
254
ListViewItem
item = new()
260
var subItem = new
ListViewItem
.ListViewSubItem();
273
var subItem = new
ListViewItem
.ListViewSubItem
292
ListViewItem
item = new()
297
var subItem = new
ListViewItem
.ListViewSubItem();
312
ListViewItem
item = new()
316
var subItem = new
ListViewItem
.ListViewSubItem();
334
ListViewItem
item = new();
337
var subItem = new
ListViewItem
.ListViewSubItem(item, "text");
348
ListViewItem
item = new()
352
var subItem = new
ListViewItem
.ListViewSubItem(item, "text");
367
ListViewItem
item = new()
372
var subItem = new
ListViewItem
.ListViewSubItem();
393
var subItem = new
ListViewItem
.ListViewSubItem
418
ListViewItem
item = new()
423
var subItem = new
ListViewItem
.ListViewSubItem();
438
ListViewItem
item = new()
442
var subItem = new
ListViewItem
.ListViewSubItem();
457
ListViewItem
item = new();
458
var subItem = new
ListViewItem
.ListViewSubItem(item, "text")
473
var subItem = new
ListViewItem
.ListViewSubItem
488
var subItem = new
ListViewItem
.ListViewSubItem
503
ListViewItem
item = new();
504
var subItem = new
ListViewItem
.ListViewSubItem(item, "text")
519
var subItem = new
ListViewItem
.ListViewSubItem
538
public void ListViewSubItem_ResetStyle_NoStyle_Nop(
ListViewItem
owner)
540
var subItem = new
ListViewItem
.ListViewSubItem(owner, "text");
554
public void ListViewSubItem_ResetStyle_HasStyleWithOwner_Success(
ListViewItem
owner)
556
var subItem = new
ListViewItem
.ListViewSubItem(owner, "text", Color.Red, Color.Blue, SystemFonts.MenuFont);
571
yield return new object[] { new
ListViewItem
.ListViewSubItem() };
572
yield return new object[] { new
ListViewItem
.ListViewSubItem(null, "header", Color.Red, Color.Blue, SystemFonts.MenuFont) { Name = "name", Tag = "tag" } };
577
public void ListViewSubItem_Serialize_Deserialize_Success(
ListViewItem
.ListViewSubItem subItem)
588
ListViewItem
.ListViewSubItem result = Assert.IsType<
ListViewItem
.ListViewSubItem>(formatter.Deserialize(stream)); // CodeQL[SM03722] : Testing legacy feature. This is a safe use of BinaryFormatter because the data is trusted and the types are controlled and validated.
602
var subItem = new
ListViewItem
.ListViewSubItem(null, text);
System\Windows\Forms\ListViewTests.cs (91)
9
using static System.Windows.Forms.
ListViewItem
;
870
ListViewItem
item1 = new()
874
ListViewItem
item2 = new();
878
Assert.Equal(new
ListViewItem
[] { item1, item2 }, listView.Items.Cast<
ListViewItem
>());
1043
ListViewItem
item1 = new()
1047
ListViewItem
item2 = new();
1051
Assert.Equal(new
ListViewItem
[] { item1, item2 }, listView.Items.Cast<
ListViewItem
>());
1224
public void ListView_FocusedItem_Set_GetReturnsExpected(
ListViewItem
value, bool? expectedFocused)
1244
ListViewItem
value = new();
1268
public void ListView_FocusedItem_SetWithHandle_GetReturnsExpected(
ListViewItem
value, bool? expectedFocused)
1286
ListViewItem
value = new();
4084
ListViewItem
item1 = new();
4085
ListViewItem
item2 = new();
4108
ListViewItem
item1 = new();
4109
ListViewItem
item2 = new();
4155
ListViewItem
item = new();
4184
ListViewItem
item = new();
4223
ListViewItem
item1 = new();
4244
ListViewItem
item1 = new();
4413
ListViewItem
listItem1 = new("Test 1");
4435
var
clone = (
ListViewItem
)listView.Items[0].Clone();
4501
ListViewItem
item1 = new()
4505
ListViewItem
item2 = new()
4532
ListViewItem
item1 = new()
4536
ListViewItem
item2 = new()
4570
ListViewItem
item1 = new(group1)
4574
ListViewItem
item2 = new(group2)
4578
ListViewItem
item3 = new(group3)
4650
ListViewItem
item1 = new();
4651
ListViewItem
item2 = new();
4719
ListViewItem
listItem = new();
4867
ListViewItem
listViewItem = new();
4880
ListViewItem
listViewItem1 = new();
4881
ListViewItem
listViewItem2 = new();
4882
ListViewItem
listViewItem3 = new();
4885
listView.Items.AddRange((
ListViewItem
[])[listViewItem1, listViewItem2, listViewItem3]);
4899
ListViewItem
listViewItem = new();
4912
ListViewItem
listViewItem = new();
4929
ListViewItem
listViewItem = new();
4943
ListViewItem
listViewItem = new();
4952
ListViewItem
listViewItem = new();
4961
ListViewItem
listViewItem = new();
4975
ListViewItem
listViewItem = new();
5003
ListViewItem
listViewItem1 = new("1");
5004
ListViewItem
listViewItem2 = new("2");
5005
ListViewItem
listViewItem3 = new("3");
5006
ListViewItem
listViewItem4 = new("4");
5007
ListViewItem
listViewItem5 = new("5");
5008
ListViewItem
listViewItem6 = new("6");
5009
ListViewItem
listViewItem7 = new("7");
5010
ListViewItem
listViewItem8 = new("8");
5011
ListViewItem
listViewItem9 = new("9");
5022
var listItems = new
ListViewItem
[]
5038
var
listViewItemToTest = listItems[item];
5059
ListViewItem
listViewItem1 = new("Item1");
5060
ListViewItem
listViewItem2 = new("item2") { ImageKey = "SmallABlue.bmp" };
5061
ListViewItem
listViewItem3 = new("item3");
5062
ListViewItem
listViewItem4 = new("Items 4") { ImageKey = "SmallA.bmp" };
5063
ListViewItem
listViewItem5 = new("Items 5");
5064
ListViewItem
listViewItem6 = new("Items 6") { ImageKey = "SmallABlue.bmp" };
5065
ListViewItem
listViewItem7 = new("Items 7") { ImageKey = "SmallA.bmp" };
5066
ListViewItem
listViewItem8 = new("Items 8");
5067
ListViewItem
listViewItem9 = new("Items 9");
5078
var listItems = new
ListViewItem
[]
5094
var
listViewItemToTest = listItems[item];
5101
private void ListView_FindNearestItem_Check_Result(
ListViewItem
[] listItems,
ListViewItem
item, SearchDirectionHint direction, int? resultItem)
5239
public static TheoryData<
ListViewItem
> GetListViewItemTheoryData() => new()
5248
public void ListView_VirtualMode_ReleaseUiaProvider_Success(
ListViewItem
listItem)
5282
ListViewItem
listItem1 = new("Item 1");
5283
ListViewItem
listItem2 = null;
5345
ListViewItem
listViewItem = listView.Items[0];
5436
ListViewItem
item = new("Test");
5528
listView.Items.AddRange((
ListViewItem
[])[new("test 1"), new("test 2"), new("test 3")]);
5560
listView.Items.AddRange((
ListViewItem
[])[new("test 1"), new("test 2"), new("test 3")]);
5564
ListViewItem
item = listView.Items[0];
5590
listView.Items.AddRange((
ListViewItem
[])[new("test 1"), new("test 2"), new("test 3")]);
5620
listView.Items.AddRange((
ListViewItem
[])[new("test 1"), new("test 2"), new("test 3")]);
5624
ListViewItem
item = listView.Items[0];
5653
listView.Items.AddRange((
ListViewItem
[])[new("test 1", groups[0]), new("test 2", groups[1]), new("test 3", groups[2])]);
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];
5728
listView.Items.AddRange((
ListViewItem
[])[new("test 1", groups[0]), new("test 2", groups[1]), new("test 3", groups[2])]);
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];
6084
public SubListViewItemAccessibleObject(
ListViewItem
owningItem) : base(owningItem)
6184
ListViewItem
listItem1 = new("Test Item 1");
6185
ListViewItem
listItem2 = new("Test Item 2");
System\Windows\Forms\RetrieveVirtualItemEventArgsTests.cs (1)
28
public void Item_Set_GetReturnsExpected(
ListViewItem
value)
System.Windows.Forms.UI.IntegrationTests (13)
DragDropTests.cs (3)
280
ListViewItem
? listViewItem = null;
281
ListViewItem
? data = null;
298
data = (
ListViewItem
?)e.Data?.GetData(DataFormats.Serializable);
ListViewTests.cs (10)
51
ListViewItem
item1 = new("g1-1") { Group = group };
52
ListViewItem
item2 = new("g1-2") { Group = group };
53
ListViewItem
item3 = new("g1-3") { Group = group };
488
foreach (
ListViewItem
item in listView.Items)
507
foreach (
ListViewItem
item in listView.Items)
521
ListViewItem
listViewItem1 = new(["row1", "row1Col2", "row1Col3"], -1) { StateImageIndex = 0 };
522
ListViewItem
listViewItem2 = new(["row2", "row2Col2", "row2Col3"], -1) { StateImageIndex = 0 };
523
ListViewItem
listViewItem3 = new(["row3", "row3Col2", "row3Col3"], -1) { StateImageIndex = 0 };
556
ListViewItem
listViewItem = new("Test");
559
listViewItem.SubItems.Add(new
ListViewItem
.ListViewSubItem() { Text = $"Test SubItem{i}" });
TrimTestBinaryDeserialization (2)
Form1.Designer.cs (2)
33
ListViewItem
listViewItem1 = new ListViewItem("This is a ListViewItem with an image", 0);
47
listView1.Items.AddRange(new
ListViewItem
[] { listViewItem1 });
WinFormsControlsTest (14)
ListViewTest.cs (7)
82
ListViewItem
item1 = new("item1", 0)
90
ListViewItem
item2 = new("item2", 1);
94
ListViewItem
item3 = new("item3")
213
var
item = ((ListView)sender).FocusedItem;
214
var
clone = (
ListViewItem
)item.Clone();
252
ListViewItem
item = new ListViewItem
ListViewTest.Designer.cs (4)
73
this.listView1.Items.AddRange(new System.Windows.Forms.
ListViewItem
[] {
74
(System.Windows.Forms.
ListViewItem
)(resources.GetObject("listView1.Items")),
75
(System.Windows.Forms.
ListViewItem
)(resources.GetObject("listView1.Items1")),
76
(System.Windows.Forms.
ListViewItem
)(resources.GetObject("listView1.Items2"))});
MultipleControls.cs (3)
44
ListViewItem
item1 = new("item1", 0)
52
ListViewItem
item2 = new("item2", 1);
56
ListViewItem
item3 = new("item3", 0)