1 implementation of Add
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Container.cs (1)
36
public virtual void
Add
(IComponent? component, string? name)
57 references to Add
System.Windows.Forms.Design (12)
System\ComponentModel\Design\InheritanceService.cs (1)
203
container.
Add
(compValue, name);
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (1)
379
Container.
Add
(component, name);
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (1)
104
host?.Container.
Add
(item, DesignerUtils.GetUniqueSiteName(host, item.Name));
System\Windows\Forms\Design\ComponentTray.cs (1)
525
host.Container.
Add
(component, name);
System\Windows\Forms\Design\ControlDesigner.cs (1)
598
nc.
Add
(child, name);
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
129
_liveDataGridView.Site?.Container?.
Add
(column, column.Name);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
248
currentContainer.
Add
(newColumns[i], compName);
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
673
host?.Container.
Add
(dataGridViewColumn, nameFromText);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1287
_designerHost.Container.
Add
(bs, uniqueSiteName);
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
643
container.
Add
(children[i], name);
2340
container.
Add
(component, name);
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
403
_nestedContainer.
Add
(_menuItem, "ContextMenuStrip");
System.Windows.Forms.Design.Tests (45)
System\ComponentModel\Design\DesignerHostTests.cs (30)
334
host.Container.
Add
(component1, "name1");
345
host.Container.
Add
(component2, "name2");
356
host.Container.
Add
(component3, string.Empty);
367
host.Container.
Add
(component4, null);
442
host.Container.
Add
(component, "name");
512
host.Container.
Add
(component, "name");
606
host.Container.
Add
(component, "name");
641
host.Container.
Add
(component, null);
696
host.Container.
Add
(component, null);
727
host.Container.
Add
(component1, name);
734
host.Container.
Add
(component2, "name2");
787
host.Container.
Add
(component1, "name1");
798
host.Container.
Add
(component2, "name2");
834
host.Container.
Add
(component, "name1");
878
host.Container.
Add
(component, "name1");
1267
host.Container.
Add
(component, oldName);
1284
host.Container.
Add
(component, "name");
1303
host.Container.
Add
(component2, null);
1304
host.Container.
Add
(component3, "name3");
1355
host.Container.
Add
(component, oldName);
1385
host.Container.
Add
(component, "oldName");
1434
host.Container.
Add
(component, "oldName");
1450
host.Container.
Add
(component1, "name1");
1451
host.Container.
Add
(component2, "name2");
1656
Assert.Throws<NotImplementedException>(() => host.Container.
Add
(component, "name"));
1666
host.Container.
Add
(component, component.GetType().FullName);
1669
Assert.Throws<InvalidOperationException>(() => host.Container.
Add
(new RootDesignerComponent(), host.RootComponentClassName));
1679
Assert.Throws<InvalidOperationException>(() => host.Container.
Add
(component, "name"));
1692
Assert.Throws<DivideByZeroException>(() => host.Container.
Add
(component, "name"));
1718
host.Container.
Add
(component, "name");
System\ComponentModel\Design\SiteNestedContainerTests.cs (15)
74
container.
Add
(component1, componentName);
88
container.
Add
(component2, "otherComponent");
93
container.
Add
(component1, "newName");
238
container.
Add
(component1, "name1");
249
container.
Add
(component2, "name2");
260
container.
Add
(component3, string.Empty);
271
container.
Add
(component4, null);
351
container.
Add
(component, "name");
432
container.
Add
(component, "name");
571
Assert.Throws<NotImplementedException>(() => container.
Add
(component, "name"));
583
container.
Add
(component, component.GetType().FullName);
586
Assert.Throws<InvalidOperationException>(() => container.
Add
(new RootDesignerComponent(), host.RootComponentClassName));
597
Assert.Throws<InvalidOperationException>(() => container.
Add
(component, "name"));
611
Assert.Throws<DivideByZeroException>(() => container.
Add
(component, "name"));
638
container.
Add
(component, "name");