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