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