1 implementation of Add
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Container.cs (1)
28
public virtual void
Add
(IComponent? component) => Add(component, null);
120 references to Add
System.IO.Ports (1)
System\IO\Ports\SerialPort.cs (1)
551
container.
Add
(this);
System.Windows.Forms (9)
System\Windows\Forms\ContextMenuStrip.cs (1)
22
container.
Add
(this);
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
71
container.
Add
(this);
System\Windows\Forms\Controls\TabControl\TabControl.ControlCollection.cs (1)
58
site.Container?.
Add
(tabPage);
System\Windows\Forms\DataBinding\BindingNavigator.cs (1)
65
container.
Add
(this);
System\Windows\Forms\DataBinding\BindingSource.cs (1)
102
container.
Add
(this);
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
85
container.
Add
(this);
System\Windows\Forms\NotifyIcon.cs (1)
71
container.
Add
(this);
System\Windows\Forms\Timer.cs (1)
46
container.
Add
(this);
System\Windows\Forms\ToolTip\ToolTip.cs (1)
81
cont.
Add
(this);
System.Windows.Forms.Design (9)
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (1)
375
Container.
Add
(component);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
225
_destHost.Container.
Add
(c);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
252
currentContainer.
Add
(newColumns[i]);
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
350
currentContainer?.
Add
(col);
System\Windows\Forms\Design\ParentControlDesigner.cs (4)
647
container.
Add
(children[i]);
1413
container.
Add
(comp);
2344
container.
Add
(component);
2374
oldContainer?.
Add
(component);
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
885
host.Container.
Add
(ToolStripItem);
System.Windows.Forms.Design.Tests (97)
System\ComponentModel\Design\DesignerHostTests.cs (63)
281
host.Container.
Add
(component1);
292
host.Container.
Add
(component2);
303
host.Container.
Add
(component3);
314
host.Container.
Add
(component4);
430
host.Container.
Add
(component);
437
host.Container.
Add
(component);
500
host.Container.
Add
(component);
507
host.Container.
Add
(component);
573
host.Container.
Add
(component);
586
host.Container.
Add
(component);
598
host.Container.
Add
(component);
603
host.Container.
Add
(component);
639
host.Container.
Add
(component);
694
host.Container.
Add
(component);
894
host.Container.
Add
(component);
899
Assert.Throws<Exception>(() => host.Container.
Add
(newComponent));
915
host.Container.
Add
(component);
928
host.Container.
Add
(component);
947
host.Container.
Add
(component);
959
host.Container.
Add
(component);
977
host.Container.
Add
(component);
989
host.Container.
Add
(component);
1007
host.Container.
Add
(component);
1043
host.Container.
Add
(component);
1070
host.Container.
Add
(component);
1103
host.Container.
Add
(component);
1133
host.Container.
Add
(component);
1167
host.Container.
Add
(component);
1205
host.Container.
Add
(component);
1240
host.Container.
Add
(component);
1304
host.Container.
Add
(component1);
1479
host.Container.
Add
(component);
1504
host.Container.
Add
(component);
1517
host.Container.
Add
(component);
1551
host.Container.
Add
(component);
1564
host.Container.
Add
(component);
1574
host.Container.
Add
(component);
1584
host.Container.
Add
(component);
1594
host.Container.
Add
(component);
1625
host.Container.
Add
(component);
1631
host.Container.
Add
(component);
1639
host.Container.
Add
(component);
1657
Assert.Throws<NotImplementedException>(() => host.Container.
Add
(component));
1670
Assert.Throws<InvalidOperationException>(() => host.Container.
Add
(component));
1680
Assert.Throws<InvalidOperationException>(() => host.Container.
Add
(component));
1690
Assert.Throws<DivideByZeroException>(() => host.Container.
Add
(component));
1709
host.Container.
Add
(component);
1813
host.Container.
Add
(component);
1828
host.Container.
Add
(component);
2255
host.Container.
Add
(component);
2533
host.Container.
Add
(rootComponent);
2534
host.Container.
Add
(component);
2621
host.Container.
Add
(component);
2690
host.Container.
Add
(component);
2720
host.Container.
Add
(component);
2737
host.Container.
Add
(component);
2756
host1.Container.
Add
(otherComponent);
2757
host2.Container.
Add
(component);
2773
host1.Container.
Add
(otherComponent);
2810
host.Container.
Add
(component1);
2811
host.Container.
Add
(component2);
2862
host.Container.
Add
(component);
2875
host.Container.
Add
(component);
System\ComponentModel\Design\SiteNestedContainerTests.cs (33)
183
container.
Add
(component1);
194
container.
Add
(component2);
205
container.
Add
(component3);
216
container.
Add
(component4);
339
container.
Add
(component);
346
container.
Add
(component);
410
container.
Add
(component);
419
Assert.Throws<ArgumentException>("provider", () => container.
Add
(component));
425
container.
Add
(component);
490
container.
Add
(component);
504
container.
Add
(component);
538
container.
Add
(component);
544
container.
Add
(component);
552
container.
Add
(component);
572
Assert.Throws<NotImplementedException>(() => container.
Add
(component));
587
Assert.Throws<InvalidOperationException>(() => container.
Add
(component));
598
Assert.Throws<InvalidOperationException>(() => container.
Add
(component));
609
Assert.Throws<DivideByZeroException>(() => container.
Add
(component));
629
container.
Add
(component);
655
container.
Add
(component);
675
container.
Add
(rootComponent);
676
container.
Add
(component);
752
container.
Add
(component);
816
container.
Add
(component);
847
container.
Add
(component);
865
container.
Add
(component);
885
container1.
Add
(otherComponent);
886
container2.
Add
(component);
903
container1.
Add
(otherComponent);
942
container.
Add
(component1);
943
container.
Add
(component2);
996
container.
Add
(component);
1010
container.
Add
(component);
System\Windows\Forms\Design\FlowPanelDesignerTests.cs (1)
20
mockContainer.Object.
Add
(panel);
System.Windows.Forms.Tests (4)
BindingNavigatorTests.cs (2)
42
mockContainer.Setup(x => x.
Add
(It.IsAny<BindingNavigator>())).Verifiable();
50
mockContainer.Verify(x => x.
Add
(bn));
ContextMenuStripTests.cs (2)
26
mockContainer.Setup(x => x.
Add
(It.IsAny<ContextMenuStrip>())).Verifiable();
34
mockContainer.Verify(x => x.
Add
(cms));