248 references to Add
DesignSurface (4)
MainForm.cs (4)
304
menuStrip1.Items.
Add
(toolStripMenuItem1);
305
menuStrip1.Items.
Add
(toolStripMenuItem2);
306
menuStrip2.Items.
Add
(menu1);
307
menuStrip2.Items.
Add
(menuNew1);
System.Windows.Forms (23)
System\Windows\Forms\ContextMenuStrip.cs (2)
70
contextMenuStrip.Items.
Add
(new ToolStripSeparator());
74
contextMenuStrip.Items.
Add
(toolStripMenuItem.Clone());
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (5)
4246
DisplayedItems.
Add
(Grip);
4295
DisplayedItems.
Add
(item);
4300
OverflowItems.
Add
(item);
4322
DisplayedItems.
Add
(OverflowButton);
4355
DisplayedItems.
Add
(item);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (2)
266
managedDropDown.Items.
Add
(itemToAdd);
783
DisplayedItems.
Add
(DownScrollButton);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
1414
value?.Items.
Add
(this);
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (5)
96
Add
(item);
130
Add
(toolStripItems[i]);
153
Add
(toolStripItems[i--]);
295
int IList.Add(object? value) { return
Add
((ToolStripItem)value!); }
475
Add
(value);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
1245
int index = destinationItems.
Add
(source);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (1)
126
_owner.Items.
Add
(droppedItem);
System\Windows\Forms\MDI\MdiWindowListStrip.cs (4)
40
Items.
Add
(_mergeItem);
88
mergeItem.DropDownItems.
Add
(separator);
131
mergeItem.DropDownItems.
Add
(windowListItem);
146
mergeItem.DropDownItems.
Add
(moreWindowsMenuItem);
System\Windows\Forms\Printing\PrintPreviewDialog.cs (2)
962
_toolStrip1.Items.
Add
(_pageCounterItem);
963
_toolStrip1.Items.
Add
(_pageToolStripLabel);
System.Windows.Forms.Design (20)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
72
addDownMenu.Items.
Add
(new TypeMenuItem(newItemTypes[i], addDownMenuClick));
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (1)
158
Items.
Add
(_panel);
System\Windows\Forms\Design\BaseContextMenuStrip.cs (1)
137
_selectionMenuItem.DropDownItems.
Add
(selectListItem);
System\Windows\Forms\Design\GroupedContextMenuStrip.cs (2)
56
Items.
Add
(new ToolStripSeparator());
61
Items.
Add
(item);
System\Windows\Forms\Design\StandardMenuStripVerb.cs (3)
194
rootItem.DropDownItems.
Add
(item);
209
tool.Items.
Add
(rootItem);
353
tool.Items.
Add
(item);
System\Windows\Forms\Design\ToolStripDesigner.cs (5)
740
ToolStrip.Items.
Add
(_editorNode);
932
ToolStrip.Items.
Add
(newItem);
1923
parentToolStrip.Items.
Add
(components[i] as ToolStripItem);
1982
ToolStrip.Items.
Add
(_editorNode);
2145
ToolStrip.Items.
Add
(_editorNode);
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
397
_designMenu.Items.
Add
(_menuItem);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (6)
381
dropDown.Items.
Add
(_typeHereNode);
745
MenuItem.DropDown.Items.
Add
(_typeHereNode);
1774
MenuItem.DropDown.Items.
Add
(newItem);
1778
MenuItem.DropDownItems.
Add
(newItem);
2056
MenuItem.DropDown.Items.
Add
(_typeHereNode);
2774
parentToolStrip.Items.
Add
(toolItem);
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\BaseContextMenuStripTests.cs (1)
24
contextMenuStrip.Items.
Add
(new ToolStripMenuItem());
System.Windows.Forms.Tests (176)
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (11)
1436
Assert.Throws<ArgumentException>(() => toolStrip.Items.
Add
(host));
1441
toolStrip.Items.
Add
(host);
1503
Assert.Throws<ArgumentException>(() => toolStrip.Items.
Add
(host));
1508
toolStrip.Items.
Add
(host);
1535
toolStrip.Items.
Add
(label);
1540
Assert.Throws<ArgumentException>(() => toolStrip.Items.
Add
(host));
1545
toolStrip.Items.
Add
(host);
1546
toolStrip.Items.
Add
(button);
1572
toolStrip.Items.
Add
(label);
1577
Assert.Throws<ArgumentException>(() => toolStrip.Items.
Add
(host));
1582
toolStrip.Items.
Add
(host);
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (10)
378
menuStrip.Items.
Add
(CreateSkippedItem());
379
menuStrip.Items.
Add
(CreateSkippedItem());
576
menuStrip.Items.
Add
(CreateSkippedItem());
592
menuStrip.Items.
Add
(CreateSkippedItem());
593
menuStrip.Items.
Add
(CreateSkippedItem());
608
menuStrip.Items.
Add
(CreateSkippedItem());
609
menuStrip.Items.
Add
(CreateSkippedItem());
662
menuStrip.Items.
Add
(CreateSkippedItem());
684
menuStrip.Items.
Add
(CreateSkippedItem());
936
menuStrip.Items.
Add
(CreateMenuItem());
System\Windows\Forms\AccessibleObjects\StatusStrip.StatusStripAccessibleObjectTests.cs (10)
358
statusStrip.Items.
Add
(CreateSkippedItem());
359
statusStrip.Items.
Add
(CreateSkippedItem());
556
statusStrip.Items.
Add
(CreateSkippedItem());
572
statusStrip.Items.
Add
(CreateSkippedItem());
573
statusStrip.Items.
Add
(CreateSkippedItem());
588
statusStrip.Items.
Add
(CreateSkippedItem());
589
statusStrip.Items.
Add
(CreateSkippedItem());
642
statusStrip.Items.
Add
(CreateSkippedItem());
664
statusStrip.Items.
Add
(CreateSkippedItem());
917
statusStrip.Items.
Add
(CreateStatusStripItem());
System\Windows\Forms\AccessibleObjects\ToolStripAccessibleObjectTests.cs (10)
371
toolStrip.Items.
Add
(CreateSkippedItem());
372
toolStrip.Items.
Add
(CreateSkippedItem());
569
toolStrip.Items.
Add
(CreateSkippedItem());
585
toolStrip.Items.
Add
(CreateSkippedItem());
586
toolStrip.Items.
Add
(CreateSkippedItem());
601
toolStrip.Items.
Add
(CreateSkippedItem());
602
toolStrip.Items.
Add
(CreateSkippedItem());
655
toolStrip.Items.
Add
(CreateSkippedItem());
677
toolStrip.Items.
Add
(CreateSkippedItem());
977
toolStrip.Items.
Add
(CreateToolStripItem());
System\Windows\Forms\AccessibleObjects\ToolStripComboBox.ToolStripComboBoxAccessibleObjectTests.cs (1)
13
toolStrip.Items.
Add
(toolStripComboBox);
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripControlHostAccessibleObjectTests.cs (1)
72
toolStrip.Items.
Add
(toolStripControlHost);
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripHostedControlAccessibleObjectTests.cs (1)
24
toolStrip.Items.
Add
(item);
System\Windows\Forms\AccessibleObjects\ToolStripDropDownButton.ToolStripDropDownButtonAccessibleObjectTests.cs (1)
79
toolStrip.Items.
Add
(dropDownItem);
System\Windows\Forms\AccessibleObjects\ToolStripDropDownItemAccessibleObjectTests.cs (4)
63
control.DropDown.Items.
Add
(new SubToolStripDropDownItem());
82
control.DropDown.Items.
Add
(new SubToolStripDropDownItem());
95
control.DropDown.Items.
Add
(new SubToolStripDropDownItem() { Available = true });
175
control.DropDownItems.
Add
(new SubToolStripDropDownItem() { Available = true });
System\Windows\Forms\AccessibleObjects\ToolStripDropDownMenu.ToolStripDropDownMenuAccessibleObjectTests.cs (12)
34
toolStrip.Items.
Add
(item);
116
toolStrip.Items.
Add
(ownerItem);
117
ownerItem.DropDownItems.
Add
(parentItem1);
118
ownerItem.DropDownItems.
Add
(parentItem2);
119
parentItem1.DropDownItems.
Add
(childItem1);
120
parentItem1.DropDownItems.
Add
(childItem2);
121
parentItem2.DropDownItems.
Add
(childItem3);
122
parentItem2.DropDownItems.
Add
(childItem4);
200
parentItem1.DropDownItems.
Add
(childItem1);
201
parentItem1.DropDownItems.
Add
(childItem2);
202
parentItem2.DropDownItems.
Add
(childItem3);
203
parentItem2.DropDownItems.
Add
(childItem4);
System\Windows\Forms\AccessibleObjects\ToolStripItemAccessibleObjectTests.cs (4)
118
toolStrip.Items.
Add
(item);
317
toolStrip.Items.
Add
(CreateSkippedItem());
319
toolStrip.Items.
Add
(CreateSkippedItem());
321
toolStrip.Items.
Add
(CreateSkippedItem());
System\Windows\Forms\AccessibleObjects\ToolStripMenuItem.ToolStripMenuItemAccessibleObjectTests.cs (6)
133
menuStrip.Items.
Add
(item1);
140
menuStrip.Items.
Add
(separator);
148
menuStrip.Items.
Add
(item2);
173
menuStrip.Items.
Add
(item1);
180
menuStrip.Items.
Add
(separator);
188
menuStrip.Items.
Add
(item2);
System\Windows\Forms\AccessibleObjects\ToolStripOverflow.ToolStripOverflowAccessibleObjectTests.cs (1)
207
toolStrip.Items.
Add
(CreateItem(ToolStripItemAlignment.Left));
System\Windows\Forms\AccessibleObjects\ToolStripProgressBar.ToolStripProgressBarControl.ToolStripProgressBarControlAccessibleObjectTests.cs (3)
126
toolStrip.Items.
Add
(label);
127
toolStrip.Items.
Add
(item);
128
toolStrip.Items.
Add
(button);
System\Windows\Forms\AccessibleObjects\ToolStripScrollButton.ToolStripScrollButtonAccessibleObjectTests.cs (10)
36
toolStrip.Items.
Add
(ownerItem);
38
ownerItem.DropDownItems.
Add
(new ToolStripDropDownButton("Item 1"));
39
ownerItem.DropDownItems.
Add
(new ToolStripDropDownButton("Item 2"));
40
ownerItem.DropDownItems.
Add
(new ToolStripDropDownButton("Item 3"));
98
toolStrip.Items.
Add
(ownerItem);
100
ownerItem.DropDownItems.
Add
(new ToolStripDropDownButton("Item 1"));
101
ownerItem.DropDownItems.
Add
(new ToolStripDropDownButton("Item 2"));
136
toolStrip.Items.
Add
(ownerItem);
138
ownerItem.DropDownItems.
Add
(new ToolStripDropDownButton("Item 1"));
139
ownerItem.DropDownItems.
Add
(new ToolStripDropDownButton("Item 2"));
System\Windows\Forms\AccessibleObjects\ToolStripSplitButton.ToolStripSplitButtonExAccessibleObjectTests.cs (2)
54
toolStrip.Items.
Add
(toolStripSplitButton);
70
toolStrip.Items.
Add
(toolStripSplitButton);
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (4)
1744
control.Items.
Add
(itemWithDefaultName);
1745
control.Items.
Add
(itemWithoutName);
1746
control.Items.
Add
(itemWithNonStringName);
1747
control.Items.
Add
(itemWithName);
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
173
toolStrip.Items.
Add
(new ToolStripLabel("text"));
System\Windows\Forms\ToolStrip.ToolStripAccessibleObjectWrapperForItemsOnOverflowTests.cs (3)
29
toolStrip.Items.
Add
(toolStripItem);
45
toolStrip.Items.
Add
(toolStripItem);
77
toolStrip.Items.
Add
(toolStripItem);
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (6)
20
toolStrip.Items.
Add
(toolStripButton);
46
toolStrip.Items.
Add
(toolStripButton);
70
toolStrip.Items.
Add
(toolStripButton);
96
toolStrip.Items.
Add
(toolStripButton);
122
toolStrip.Items.
Add
(toolStripDropDownButton);
149
toolStrip.Items.
Add
(toolStripDropDownButton);
System\Windows\Forms\ToolStripDropDownTests.cs (14)
1589
control.Items.
Add
(item1);
1590
control.Items.
Add
(item2);
1654
control.Items.
Add
(child1);
1655
control.Items.
Add
(child2);
3206
control.Items.
Add
(item1);
3207
control.Items.
Add
(item2);
3479
control.Items.
Add
(item1);
3480
control.Items.
Add
(item2);
3560
control.Items.
Add
(item1);
3561
control.Items.
Add
(item2);
4278
control.Items.
Add
(item1);
4279
control.Items.
Add
(item2);
4511
control.Items.
Add
(item1);
4512
control.Items.
Add
(item2);
System\Windows\Forms\ToolStripItemCollectionTests.cs (9)
44
child3.DropDownItems.
Add
(grandchild1);
45
child3.DropDownItems.
Add
(grandchild2);
46
child3.DropDownItems.
Add
(grandchild3);
48
collection.
Add
(child1);
49
collection.
Add
(child2);
50
collection.
Add
(child3);
87
collection.
Add
(child1);
88
collection.
Add
(child2);
89
collection.
Add
(child3);
System\Windows\Forms\ToolStripItemRenderEventArgsTests.cs (1)
36
toolStrip.Items.
Add
(toolStripItem);
System\Windows\Forms\ToolStripItemTests.cs (3)
395
toolStrip.Items.
Add
(item);
7078
toolStrip.Items.
Add
(toolStripDropDownItem1);
7081
toolStripDropDownItem1.DropDownItems.
Add
(toolStripDropDownItem2);
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (1)
83
owner.Items.
Add
(ownedDropDownItem);
System\Windows\Forms\ToolStripTests.cs (47)
389
control.Items.
Add
(item);
534
control.Items.
Add
(item);
1505
control.Items.
Add
(item1);
1506
control.Items.
Add
(item2);
1570
control.Items.
Add
(child1);
1571
control.Items.
Add
(child2);
1631
toolStrip1.Items.
Add
(item1);
1632
toolStrip1.Items.
Add
(item2);
1651
toolStrip1.Items.
Add
(item1);
1652
toolStrip1.Items.
Add
(item2);
3478
control.Items.
Add
(item1);
3479
control.Items.
Add
(item2);
3508
control.Items.
Add
(item1);
3509
control.Items.
Add
(item2);
3609
control.Items.
Add
(item);
3895
control.Items.
Add
(item1);
3896
control.Items.
Add
(item2);
3938
control.Items.
Add
(item1);
3939
control.Items.
Add
(item2);
3975
control.Items.
Add
(item1);
3976
control.Items.
Add
(item2);
4040
control.Items.
Add
(item1);
4041
control.Items.
Add
(item2);
4465
control.Items.
Add
(item1);
4466
control.Items.
Add
(item2);
4633
control.Items.
Add
(item1);
4634
control.Items.
Add
(item2);
4714
control.Items.
Add
(item1);
4715
control.Items.
Add
(item2);
5283
control.Items.
Add
(item1);
5284
control.Items.
Add
(item2);
5320
control.Items.
Add
(item1);
5321
control.Items.
Add
(item2);
5456
control.Items.
Add
(item1);
5457
control.Items.
Add
(item2);
5656
control.Items.
Add
(item1);
5657
control.Items.
Add
(item2);
5828
toolStrip.Items.
Add
(item);
6406
control.Items.
Add
(item1);
6407
control.Items.
Add
(item2);
6459
control.Items.
Add
(item1);
6460
control.Items.
Add
(item2);
6697
control.Items.
Add
(item1);
6698
control.Items.
Add
(item2);
6742
control.Items.
Add
(item1);
6743
control.Items.
Add
(item2);
7345
toolStripMenuItem.DropDownItems.
Add
(listToolStripMenuItem);
System.Windows.Forms.UI.IntegrationTests (8)
Dpi\ToolStripItemTests.Dpi.cs (1)
41
toolStrip.Items.
Add
(toolStripItemOpen);
DragDropTests.cs (2)
979
ToolStrip.Items.
Add
(toolStripDropDownButton);
1006
_contextMenuStrip.Items.
Add
(dragAcceptItem);
ToolStripTests.cs (5)
41
toolStrip.Items.
Add
(toolStripButton);
71
menu1.DropDownItems.
Add
(menu1Item1);
75
hiddenMenu.DropDownItems.
Add
(hiddenMenuItem1);
79
menuStrip.Items.
Add
(menu1);
80
menuStrip.Items.
Add
(hiddenMenu);
WinFormsControlsTest (16)
Dialogs.cs (2)
56
toolbar.Items.
Add
(new ToolStripSeparator { Visible = true });
57
toolbar.Items.
Add
(_btnOpen);
DragDrop.cs (4)
456
toolStrip.Items.
Add
(catToolStripDropDownButton);
504
_catContextMenuStrip.Items.
Add
(dragAcceptItem);
505
_catContextMenuStrip.Items.
Add
(nyanCatItem);
506
_catContextMenuStrip.Items.
Add
(asciiCatItem);
MdiChild.cs (2)
16
_menuStrip.Items.
Add
(new ToolStripMenuItem { Text = "Child1" });
17
_menuStrip.Items.
Add
(new ToolStripMenuItem
MdiParent.cs (2)
31
_menuStrip.Items.
Add
(menu);
40
_menuStrip.Items.
Add
(item);
MessageBoxes.cs (2)
42
toolbar.Items.
Add
(new ToolStripSeparator { Visible = true });
43
toolbar.Items.
Add
(_btnOpen);
ToolStripTests.cs (4)
15
toolStrip1.Items.
Add
(new ToolStripControlHost(new RadioButton() { Text = "RadioButton" })); // RadioButton supports UIA
16
toolStrip1.Items.
Add
(new ToolStripControlHost(new HScrollBar() { Value = 30 })); // HScrollBar doesn't support UIA
17
statusStrip1.Items.
Add
(new ToolStripControlHost(new RadioButton() { Text = "RadioButton" })); // RadioButton supports UIA
18
statusStrip1.Items.
Add
(new ToolStripControlHost(new HScrollBar() { Value = 30 })); // HScrollBar doesn't support UIA