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