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)
279host.Container.Add(component1); 290host.Container.Add(component2); 301host.Container.Add(component3); 312host.Container.Add(component4); 428host.Container.Add(component); 435host.Container.Add(component); 498host.Container.Add(component); 505host.Container.Add(component); 571host.Container.Add(component); 584host.Container.Add(component); 596host.Container.Add(component); 601host.Container.Add(component); 637host.Container.Add(component); 692host.Container.Add(component); 892host.Container.Add(component); 897Assert.Throws<Exception>(() => host.Container.Add(newComponent)); 913host.Container.Add(component); 926host.Container.Add(component); 945host.Container.Add(component); 957host.Container.Add(component); 975host.Container.Add(component); 987host.Container.Add(component); 1005host.Container.Add(component); 1041host.Container.Add(component); 1068host.Container.Add(component); 1101host.Container.Add(component); 1131host.Container.Add(component); 1165host.Container.Add(component); 1203host.Container.Add(component); 1238host.Container.Add(component); 1302host.Container.Add(component1); 1477host.Container.Add(component); 1502host.Container.Add(component); 1515host.Container.Add(component); 1549host.Container.Add(component); 1562host.Container.Add(component); 1572host.Container.Add(component); 1582host.Container.Add(component); 1592host.Container.Add(component); 1623host.Container.Add(component); 1629host.Container.Add(component); 1637host.Container.Add(component); 1655Assert.Throws<NotImplementedException>(() => host.Container.Add(component)); 1668Assert.Throws<InvalidOperationException>(() => host.Container.Add(component)); 1678Assert.Throws<InvalidOperationException>(() => host.Container.Add(component)); 1688Assert.Throws<DivideByZeroException>(() => host.Container.Add(component)); 1707host.Container.Add(component); 1811host.Container.Add(component); 1826host.Container.Add(component); 2253host.Container.Add(component); 2531host.Container.Add(rootComponent); 2532host.Container.Add(component); 2619host.Container.Add(component); 2688host.Container.Add(component); 2718host.Container.Add(component); 2735host.Container.Add(component); 2754host1.Container.Add(otherComponent); 2755host2.Container.Add(component); 2771host1.Container.Add(otherComponent); 2808host.Container.Add(component1); 2809host.Container.Add(component2); 2860host.Container.Add(component); 2873host.Container.Add(component);
System\ComponentModel\Design\SiteNestedContainerTests.cs (33)
181container.Add(component1); 192container.Add(component2); 203container.Add(component3); 214container.Add(component4); 337container.Add(component); 344container.Add(component); 408container.Add(component); 417Assert.Throws<ArgumentException>("provider", () => container.Add(component)); 423container.Add(component); 488container.Add(component); 502container.Add(component); 536container.Add(component); 542container.Add(component); 550container.Add(component); 570Assert.Throws<NotImplementedException>(() => container.Add(component)); 585Assert.Throws<InvalidOperationException>(() => container.Add(component)); 596Assert.Throws<InvalidOperationException>(() => container.Add(component)); 607Assert.Throws<DivideByZeroException>(() => container.Add(component)); 627container.Add(component); 653container.Add(component); 673container.Add(rootComponent); 674container.Add(component); 750container.Add(component); 814container.Add(component); 845container.Add(component); 863container.Add(component); 883container1.Add(otherComponent); 884container2.Add(component); 901container1.Add(otherComponent); 940container.Add(component1); 941container.Add(component2); 994container.Add(component); 1008container.Add(component);
System\Windows\Forms\Design\FlowPanelDesignerTests.cs (1)
22mockContainer.Object.Add(panel);
System.Windows.Forms.Tests (4)
BindingNavigatorTests.cs (2)
40mockContainer.Setup(x => x.Add(It.IsAny<BindingNavigator>())).Verifiable(); 48mockContainer.Verify(x => x.Add(bn));
ContextMenuStripTests.cs (2)
24mockContainer.Setup(x => x.Add(It.IsAny<ContextMenuStrip>())).Verifiable(); 32mockContainer.Verify(x => x.Add(cms));