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)
336
host.Container.
Add
(component1, "name1");
347
host.Container.
Add
(component2, "name2");
358
host.Container.
Add
(component3, string.Empty);
369
host.Container.
Add
(component4, null);
444
host.Container.
Add
(component, "name");
514
host.Container.
Add
(component, "name");
608
host.Container.
Add
(component, "name");
643
host.Container.
Add
(component, null);
698
host.Container.
Add
(component, null);
729
host.Container.
Add
(component1, name);
736
host.Container.
Add
(component2, "name2");
789
host.Container.
Add
(component1, "name1");
800
host.Container.
Add
(component2, "name2");
836
host.Container.
Add
(component, "name1");
880
host.Container.
Add
(component, "name1");
1269
host.Container.
Add
(component, oldName);
1286
host.Container.
Add
(component, "name");
1305
host.Container.
Add
(component2, null);
1306
host.Container.
Add
(component3, "name3");
1357
host.Container.
Add
(component, oldName);
1387
host.Container.
Add
(component, "oldName");
1436
host.Container.
Add
(component, "oldName");
1452
host.Container.
Add
(component1, "name1");
1453
host.Container.
Add
(component2, "name2");
1658
Assert.Throws<NotImplementedException>(() => host.Container.
Add
(component, "name"));
1668
host.Container.
Add
(component, component.GetType().FullName);
1671
Assert.Throws<InvalidOperationException>(() => host.Container.
Add
(new RootDesignerComponent(), host.RootComponentClassName));
1681
Assert.Throws<InvalidOperationException>(() => host.Container.
Add
(component, "name"));
1694
Assert.Throws<DivideByZeroException>(() => host.Container.
Add
(component, "name"));
1720
host.Container.
Add
(component, "name");
System\ComponentModel\Design\SiteNestedContainerTests.cs (15)
76
container.
Add
(component1, componentName);
90
container.
Add
(component2, "otherComponent");
95
container.
Add
(component1, "newName");
240
container.
Add
(component1, "name1");
251
container.
Add
(component2, "name2");
262
container.
Add
(component3, string.Empty);
273
container.
Add
(component4, null);
353
container.
Add
(component, "name");
434
container.
Add
(component, "name");
573
Assert.Throws<NotImplementedException>(() => container.
Add
(component, "name"));
585
container.
Add
(component, component.GetType().FullName);
588
Assert.Throws<InvalidOperationException>(() => container.
Add
(new RootDesignerComponent(), host.RootComponentClassName));
599
Assert.Throws<InvalidOperationException>(() => container.
Add
(component, "name"));
613
Assert.Throws<DivideByZeroException>(() => container.
Add
(component, "name"));
640
container.
Add
(component, "name");