1 implementation of Components
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Container.cs (1)
135public virtual ComponentCollection Components
150 references to Components
DesignSurfaceExt (1)
NameCreationServiceImp.cs (1)
22ComponentCollection cc = container.Components;
System.ComponentModel.TypeConverter (3)
System\ComponentModel\ReferenceConverter.cs (2)
67object? obj = cont.Components[text]; 153ComponentCollection objs = cont.Components;
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
668return GetExtenders(cont.Components, instance, cache);
System.Windows.Forms (2)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
319if (container?.Components is { } components)
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
211ComponentCollection comps = container.Components;
System.Windows.Forms.Design (51)
System\ComponentModel\Design\ReferenceService.cs (2)
84_references = new(container.Components.Count); 85foreach (IComponent component in container.Components)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (3)
238curComp = container.Components[compName]; 462foreach (IComponent c in container.Components) 478if (c.Site.TryGetService(out INestedContainer? nested) && nested.Components.Count > 0)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
249object? instance = container.Components[compName];
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.PassThroughSerializationManager.cs (1)
70Manager.PreserveNames && Manager.Container?.Components[name] is not null && _resolved.Add(name))
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (4)
807typeDeclaration = _typeSerializer.Serialize(manager, LoaderHost.RootComponent, LoaderHost.Container.Components); 1064if (container.Components[finalName] is not null) 1161if (Modified && LoaderHost.Container.Components[name] is not null) 1254if (!dup && Modified && LoaderHost.Container.Components[name] is not null)
System\ComponentModel\Design\Serialization\CodeDomLocalizationProvider.LanguageExtenders.cs (1)
55foreach (IComponent c in container.Components)
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (4)
237instance = Container.Components[name]; 267if (Container.Components[name] is not null) 367if (Container.Components[name] is not null) 807instance = Container.Components[name];
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (1)
262IComponent? comp = container.Components[name];
System\ComponentModel\Design\UndoEngine.cs (1)
445foreach (IComponent comp in _host.Container.Components)
System\ComponentModel\Design\UndoEngine.UndoUnit.AddRemoveUndoEvent.cs (1)
86IComponent? component = host.Container.Components[_componentName];
System\ComponentModel\Design\UndoEngine.UndoUnit.ChangeUndoEvent.cs (1)
119component = host.Container.Components[_componentName];
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (1)
475IComponent? comp = container.Components[name];
System\ComponentModel\Design\UndoEngine.UndoUnit.RenameUndoEvent.cs (1)
29IComponent? comp = engine._host.Container.Components[_after];
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
796foreach (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\CommandSet.cs (2)
2206ComponentCollection components = host.Container.Components; 3130cmd.Enabled = host.Container.Components.Count > 1;
System\Windows\Forms\Design\ComponentTray.cs (1)
520if (host.Container.Components[name] is not null)
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (3)
34suspendedComponents = new(container.Components.Count); 36foreach (IComponent component in container.Components) 234foreach (IComponent component in host.Container.Components)
System\Windows\Forms\Design\ControlCommandSet.cs (2)
854ComponentCollection components = host.Container.Components; 1296ComponentCollection comps = host.Container.Components;
System\Windows\Forms\Design\ControlDesigner.cs (2)
590for (int i = 0; i < nc.Components.Count; i++) 592if (child.Equals(nc.Components[i]))
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
876if (container is not null && container.Components[name] is not null)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1177ComponentCollection components = container.Components;
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
607ComponentCollection components = container.Components; 1430foreach (IComponent comp in container.Components)
System\Windows\Forms\Design\DesignerUtils.cs (1)
633object? existingComponent = host.Container.Components[name];
System\Windows\Forms\Design\DocumentDesigner.cs (2)
845_suspendedComponents = new(container.Components.Count + 1); 847foreach (IComponent comp in container.Components)
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
622if (container.Components[name] is not null) 2332if (name is not null && container.Components[name] is not null)
System\Windows\Forms\Design\StandardMenuStripVerb.cs (3)
115while (_host.Container.Components[name] is not null) 289while (_host.Container.Components[name] is not null) 494object existingComponent = _host.Container.Components[baseName];
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1739object existingComponent = container.Components[baseName]; 1758for (int indexer = 1; !nameCreate.IsValidName(newName) || container.Components[newName] is not null; indexer++)
System\Windows\Forms\Design\ToolStripInSituService.cs (1)
232ComponentCollection comps = _designerHost.Container.Components;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
811newItem = (ToolStripItem)host.Container.Components[name];
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (1)
456ComponentCollection comps = _designerHost.Container.Components;
System.Windows.Forms.Design.Tests (93)
System\ComponentModel\Design\DesignerHostTests.cs (42)
280Assert.Same(component1, Assert.Single(host.Container.Components)); 291Assert.Equal(new IComponent[] { component1, component2 }, host.Container.Components.Cast<IComponent>()); 302Assert.Equal(new IComponent[] { component1, component2, component3 }, host.Container.Components.Cast<IComponent>()); 313Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, host.Container.Components.Cast<IComponent>()); 335Assert.Same(component1, Assert.Single(host.Container.Components)); 346Assert.Equal(new IComponent[] { component1, component2 }, host.Container.Components.Cast<IComponent>()); 357Assert.Equal(new IComponent[] { component1, component2, component3 }, host.Container.Components.Cast<IComponent>()); 368Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, host.Container.Components.Cast<IComponent>()); 429Assert.Same(component, Assert.Single(host.Container.Components)); 436Assert.Same(component, Assert.Single(host.Container.Components)); 443Assert.Same(component, Assert.Single(host.Container.Components)); 499Assert.Same(component, Assert.Single(host.Container.Components)); 506Assert.Same(component, Assert.Single(host.Container.Components)); 513Assert.Same(component, Assert.Single(host.Container.Components)); 572Assert.Same(component, Assert.Single(host.Container.Components)); 585Assert.Same(component, Assert.Single(host.Container.Components)); 597Assert.Same(component, Assert.Single(host.Container.Components)); 602Assert.Same(component, Assert.Single(host.Container.Components)); 607Assert.Same(component, Assert.Single(host.Container.Components)); 1518Assert.Empty(container.Components); 1657Assert.Empty(host.Container.Components); 2244Assert.Same(collection, surface.ComponentContainer.Components); 2534Assert.Same(component, Assert.Single(host.Container.Components)); 2546Assert.Same(component, Assert.Single(host.Container.Components)); 2558Assert.Empty(host.Container.Components); 2620Assert.Same(component, Assert.Single(host.Container.Components)); 2626Assert.Empty(host.Container.Components); 2633Assert.Empty(host.Container.Components); 2689Assert.Same(component, Assert.Single(host.Container.Components)); 2696Assert.Empty(host.Container.Components); 2703Assert.Empty(host.Container.Components); 2719Assert.Same(component, Assert.Single(host.Container.Components)); 2723Assert.Empty(host.Container.Components); 2736Assert.Same(component, Assert.Single(host.Container.Components)); 2740Assert.Empty(host.Container.Components); 2758Assert.Same(otherComponent, Assert.Single(host1.Container.Components)); 2759Assert.Same(component, Assert.Single(host2.Container.Components)); 2774Assert.Same(otherComponent, Assert.Single(host1.Container.Components)); 2775Assert.Empty(host2.Container.Components); 2817Assert.Same(component2, Assert.Single(host.Container.Components)); 2827Assert.Same(component2, Assert.Single(host.Container.Components)); 2839Assert.Empty(host.Container.Components);
System\ComponentModel\Design\DesignSurfaceTests.cs (7)
18Assert.Empty(surface.ComponentContainer.Components); 57Assert.Empty(surface.ComponentContainer.Components); 79Assert.Single(surface.ComponentContainer.Components); 101Assert.Single(surface.ComponentContainer.Components); 148Assert.Single(surface.ComponentContainer.Components); 1134Assert.Empty(container.Components); 1145Assert.Empty(container.Components);
System\ComponentModel\Design\SiteNestedContainerTests.cs (44)
82Assert.Same(component1, Assert.Single(container.Components)); 83Assert.Empty(host.Container.Components); 89Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 90Assert.Empty(host.Container.Components); 99Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 100Assert.Empty(host.Container.Components); 182Assert.Same(component1, Assert.Single(container.Components)); 193Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 204Assert.Equal(new IComponent[] { component1, component2, component3 }, container.Components.Cast<IComponent>()); 215Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, container.Components.Cast<IComponent>()); 239Assert.Same(component1, Assert.Single(container.Components)); 250Assert.Equal(new IComponent[] { component1, component2 }, container.Components.Cast<IComponent>()); 261Assert.Equal(new IComponent[] { component1, component2, component3 }, container.Components.Cast<IComponent>()); 272Assert.Equal(new IComponent[] { component1, component2, component3, component4 }, container.Components.Cast<IComponent>()); 338Assert.Same(component, Assert.Single(container.Components)); 345Assert.Same(component, Assert.Single(container.Components)); 352Assert.Same(component, Assert.Single(container.Components)); 409Assert.Same(component, Assert.Single(container.Components)); 418Assert.Empty(container.Components); 424Assert.Same(component, Assert.Single(container.Components)); 433Assert.Same(component, Assert.Single(container.Components)); 489Assert.Same(component, Assert.Single(container.Components)); 503Assert.Same(component, Assert.Single(container.Components)); 572Assert.Empty(container.Components); 676Assert.Same(component, Assert.Single(container.Components)); 686Assert.Same(component, Assert.Single(container.Components)); 696Assert.Empty(container.Components); 751Assert.Same(component, Assert.Single(container.Components)); 757Assert.Empty(container.Components); 764Assert.Empty(container.Components); 815Assert.Same(component, Assert.Single(container.Components)); 822Assert.Empty(container.Components); 829Assert.Empty(container.Components); 846Assert.Same(component, Assert.Single(container.Components)); 850Assert.Empty(container.Components); 864Assert.Same(component, Assert.Single(container.Components)); 868Assert.Empty(container.Components); 887Assert.Same(otherComponent, Assert.Single(container1.Components)); 888Assert.Same(component, Assert.Single(container2.Components)); 904Assert.Same(otherComponent, Assert.Single(container1.Components)); 905Assert.Empty(container2.Components); 949Assert.Same(component2, Assert.Single(container.Components)); 959Assert.Same(component2, Assert.Single(container.Components)); 971Assert.Empty(host.Container.Components);