1 implementation of Container
System.Windows.Forms.Design (1)
System\ComponentModel\Design\DesignerHost.cs (1)
861IContainer IDesignerHost.Container => this;
51 references to Container
System.Windows.Forms (1)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
3441&& _designerHost?.Container?.Components is ComponentCollection components)
System.Windows.Forms.Design (50)
System\ComponentModel\Design\DesignSurface.cs (1)
76return ((IDesignerHost)_host).Container;
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (4)
801typeDeclaration = _typeSerializer.Serialize(manager, LoaderHost.RootComponent, LoaderHost.Container.Components); 971return css.Deserialize(data, LoaderHost.Container); 1152if (Modified && LoaderHost.Container.Components[name] is not null) 1245if (!dup && Modified && LoaderHost.Container.Components[name] is not null)
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (2)
70_container = host.Container; 261if (GetService(typeof(IDesignerHost)) is IDesignerHost host && host.Container == Container)
System\ComponentModel\Design\UndoEngine.cs (2)
442if (Enabled && _host is not null && _host.Container is not null && ComponentChangeService is not null) 445foreach (IComponent comp in _host.Container.Components)
System\ComponentModel\Design\UndoEngine.UndoUnit.AddRemoveUndoEvent.cs (2)
78engine._serializationService.DeserializeTo(_serializedData, host.Container); 86IComponent? component = host.Container.Components[_componentName];
System\ComponentModel\Design\UndoEngine.UndoUnit.ChangeUndoEvent.cs (2)
119component = host.Container.Components[_componentName]; 160engine._serializationService.DeserializeTo(_before, host.Container);
System\ComponentModel\Design\UndoEngine.UndoUnit.RenameUndoEvent.cs (1)
29IComponent? comp = engine._host.Container.Components[_after];
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
793foreach (Component comp in host.Container.Components)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (1)
586foreach (IComponent comp in host.Container.Components)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
225_destHost.Container.Add(c);
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (1)
104host?.Container.Add(item, DesignerUtils.GetUniqueSiteName(host, item.Name));
System\Windows\Forms\Design\CommandSet.cs (4)
2201ComponentCollection components = host.Container.Components; 3002if (obj is IComponent { Site: { } objSite } && objSite.Container == host.Container) 3051if (obj is IComponent comp && (comp.Site is null || comp.Site.Container != host.Container)) 3125cmd.Enabled = host.Container.Components.Count > 1;
System\Windows\Forms\Design\ComponentTray.cs (3)
512if (host is not null && host.Container is not null) 514if (host.Container.Components[name] is not null) 519host.Container.Add(component, name);
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (1)
234foreach (IComponent component in host.Container.Components)
System\Windows\Forms\Design\ControlCommandSet.cs (3)
851ComponentCollection components = host.Container.Components; 1290ComponentCollection comps = host.Container.Components; 1369IContainer container = host.Container;
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (3)
156IContainer? container = host?.Container; 637container = host.Container; 771IContainer? container = host?.Container;
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (1)
58IContainer? container = host?.Container;
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
663host?.Container.Add(dataGridViewColumn, nameFromText);
System\Windows\Forms\Design\DesignBindingPicker.cs (3)
593container = _designerHost.Container; 1284_designerHost.Container.Add(bs, uniqueSiteName); 1421IContainer? container = _designerHost?.Container;
System\Windows\Forms\Design\DesignerUtils.cs (1)
633object? existingComponent = host.Container.Components[name];
System\Windows\Forms\Design\DocumentDesigner.cs (1)
800IContainer container = host.Container;
System\Windows\Forms\Design\StandardMenuStripVerb.cs (4)
114while (_host.Container.Components[name] is not null) 281while (_host.Container.Components[name] is not null) 479object existingComponent = _host.Container.Components[baseName]; 486return nameCreationService.CreateName(_host.Container, itemType);
System\Windows\Forms\Design\ToolStripInSituService.cs (1)
220ComponentCollection comps = _designerHost.Container.Components;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (3)
788serializationService.DeserializeTo(serializedData, host.Container, false, true); 790newItem = (ToolStripItem)host.Container.Components[name]; 864host.Container.Add(ToolStripItem);
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (3)
453ComponentCollection comps = _designerHost.Container.Components; 1657IContainer container = host.Container; 1748IContainer container = host.Container;