10 implementations of Container
System.ComponentModel.TypeConverter (2)
System\ComponentModel\Container.cs (1)
261public IContainer Container { get; }
System\ComponentModel\NestedContainer.cs (1)
119public IContainer Container { get; }
System.Windows.Forms (2)
System\Windows\Forms\ActiveX\Control.AxSourcingSite.cs (1)
33public IContainer? Container => null;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
39IContainer? ISite.Container => _owner.Site?.Container;
System.Windows.Forms.Design (3)
System\ComponentModel\Design\CollectionEditor.PropertyGridSite.cs (1)
21public IContainer? Container => null;
System\ComponentModel\Design\DesignerHost.Site.cs (1)
192IContainer ISite.Container => _container;
System\Windows\Forms\Design\DataGridViewComponentPropertyGridSite.cs (1)
27public IContainer? Container => null;
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (1)
173public IContainer Container { get; init; } = new Container();
System.Windows.Forms.Tests (2)
System\Windows\Forms\AccessibleObjects\PropertyGrid.PropertyGridAccessibleObjectTests.cs (1)
212public IContainer Container { get; }
System\Windows\Forms\PropertyGridTests.cs (1)
4271public IContainer Container => null;
294 references to Container
System.ComponentModel.Primitives (2)
System\ComponentModel\Component.cs (2)
86_site?.Container?.Remove(this); 101public IContainer? Container => _site?.Container;
System.ComponentModel.TypeConverter (6)
System\ComponentModel\Container.cs (3)
46if (site != null && site.Container == this) 68site?.Container!.Remove(component); 188if (site == null || site.Container != this)
System\ComponentModel\MarshalByValueComponent.cs (2)
132_site?.Container?.Remove(this); 142public virtual IContainer? Container => _site?.Container;
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
665IContainer? cont = component.Site.Container;
System.Data.Common (2)
System\Data\DataSet.cs (1)
1000IContainer? cont = oldSite.Container;
System\Data\DataTable.cs (1)
2707IContainer? cont = oldSite.Container;
System.Windows.Forms (12)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (3)
140_associatedContainer = site.Container; 383=> _parent.Site is { } site && site.DesignMode ? site.Container : null; 396if (control.Site is { } site && site.Container is { } container)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
849Site?.Container?.Remove(this);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
176public virtual IContainer? Container => Component?.Site?.Container;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (2)
48container = component.Site.Container; 51else if (container == component.Site.Container)
System\Windows\Forms\Controls\TabControl\TabControl.ControlCollection.cs (1)
58site.Container?.Add(tabPage);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
39IContainer? ISite.Container => _owner.Site?.Container;
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (3)
204return site is not null && site.DesignMode ? site.Container : null; 273if (ctl.Site is not ISite site || site.Container is not IContainer container) 317_associatedContainer = site.Container;
System.Windows.Forms.Design (40)
System\ComponentModel\Design\DesignerEventService.cs (1)
84if (ce.Component?.Site?.Container is IDesignerHost { Loading: true })
System\ComponentModel\Design\DesignerHost.cs (3)
208if (existingSite is not null && existingSite.Container == this) 635if (site is null || site.Container != container) 974if (component.Site is null || component.Site.Container != this)
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (2)
40selectedNames[site.Name!] = site.Container!; 100if (e.Component!.Site?.Container is INestedContainer)
System\Windows\Forms\Design\CollectionEditVerbManager.cs (1)
74return _designer.Component.Site.Container;
System\Windows\Forms\Design\CommandSet.cs (2)
3007if (obj is IComponent { Site: { } objSite } && objSite.Container == host.Container) 3056if (obj is IComponent comp && (comp.Site is null || comp.Site.Container != host.Container))
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (2)
423if (child.Site is null || child.Site.Container != control.Site!.Container)
System\Windows\Forms\Design\ControlCommandSet.cs (5)
370IContainer container = component.Site.Container; 388if (currentSnapProp.PropertyType == typeof(bool) && c.Site is not null && c.Site.Container == container) 1025INestedContainer nestedContainer = nestedSite.Container as INestedContainer; 1411controlSiteContainer = DesignerUtils.CheckForNestedContainer(nextControl.Site.Container); // ...necessary to support SplitterPanel components 1461if (ctl.Site is not null && ctl.Site.Container == ctl.Container)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
129_liveDataGridView.Site?.Container?.Add(column, column.Name);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
184IContainer? currentContainer = _liveDataGridView.Site?.Container;
System\Windows\Forms\Design\DataGridViewDesigner.cs (4)
341IContainer? currentContainer = dataGridView.Site?.Container; 345IContainer? container = col.Site?.Container; 400IContainer? currentContainer = dataGridView.Site?.Container; 577IContainer? currentContainer = site?.Container;
System\Windows\Forms\Design\DesignerUtils.cs (1)
726container is NestedContainer nestedContainer ? (nestedContainer.Owner.Site?.Container) : container;
System\Windows\Forms\Design\DocumentDesigner.cs (1)
740isvc.AddInheritedComponents(component, component.Site.Container);
System\Windows\Forms\Design\EditorServiceContext.cs (1)
76IContainer? ITypeDescriptorContext.Container => _designer.Component.Site?.Container;
System\Windows\Forms\Design\OleDragDropHandler.cs (3)
668IContainer? container = host.RootComponent.Site!.Container; 682bool newContainer = dragOwner is null || Destination.Component is null || dragOwner.Site!.Container != Destination.Component.Site!.Container;
System\Windows\Forms\Design\ParentControlDesigner.cs (6)
627childContainer = childSite.Container; 866IContainer container = Component.Site.Container; 879child.Site is not null && child.Site.Container == container) 1406IContainer container = target.Component.Site.Container; 2309IContainer container = DesignerUtils.CheckForNestedContainer(Component.Site.Container); // ...necessary to support SplitterPanel components 2320oldContainer = component.Site.Container;
System\Windows\Forms\Design\TabOrder.cs (2)
387container = site.Container; 448if (control.Site is not ISite site || site.Container != _host)
System\Windows\Forms\Design\ToolStripCodeDomSerializer.cs (2)
25if (item.Site is not null && toolStrip.Site is not null && item.Site.Container == toolStrip.Site.Container)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (2)
1715if (!(next is Control nextControl) || nextControl.Site is null || nextControl.Site.Container != container) 1986if (ctl.Site is not null && ctl.Site.Container == container && !(ctl is ToolStripPanel))
System.Windows.Forms.Design.Tests (45)
Mocks\MockSite.cs (1)
70.Setup(s => s.Container)
System\ComponentModel\Design\ComponentDesignerTests.cs (23)
225.SetupGet(s => s.Container) 518.SetupGet(s => s.Container) 590.SetupGet(s => s.Container) 829.SetupGet(s => s.Container) 947.SetupGet(s => s.Container) 1053.SetupGet(s => s.Container) 1161.SetupGet(s => s.Container) 1254.SetupGet(s => s.Container) 1345.SetupGet(s => s.Container) 1439.SetupGet(s => s.Container) 1546.SetupGet(s => s.Container) 1644.SetupGet(s => s.Container) 1723.SetupGet(s => s.Container) 1781.SetupGet(s => s.Container) 1841.SetupGet(s => s.Container) 1917.SetupGet(s => s.Container) 1970.SetupGet(s => s.Container) 2052.SetupGet(s => s.Container) 2112.SetupGet(s => s.Container) 2163.SetupGet(s => s.Container) 2227.SetupGet(s => s.Container) 2634.SetupGet(s => s.Container) 2669.Setup(s => s.Container)
System\ComponentModel\Design\DesignerActionListTests.cs (1)
52.Setup(s => s.Container)
System\ComponentModel\Design\DesignerHostTests.cs (8)
285Assert.Same(host, component1.Site.Container); 296Assert.Same(host, component2.Site.Container); 307Assert.Same(host, component3.Site.Container); 318Assert.Same(host, component4.Site.Container); 340Assert.Same(host, component1.Site.Container); 351Assert.Same(host, component2.Site.Container); 362Assert.Same(host, component3.Site.Container); 373Assert.Same(host, component4.Site.Container);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (1)
25.Setup(s => s.Container)
System\ComponentModel\Design\SiteNestedContainerTests.cs (10)
20.Setup(s => s.Container) 78Assert.Same(container, nestedSite.Container); 187Assert.Same(container, component1.Site.Container); 198Assert.Same(container, component2.Site.Container); 209Assert.Same(container, component3.Site.Container); 220Assert.Same(container, component4.Site.Container); 244Assert.Same(container, component1.Site.Container); 255Assert.Same(container, component2.Site.Container); 266Assert.Same(container, component3.Site.Container); 277Assert.Same(container, component4.Site.Container);
TestControlDesigner.Mocks.cs (1)
102.Setup(s => s.Container)
System.Windows.Forms.Tests (187)
System\Windows\Forms\AxHostTests.cs (17)
253.Setup(s => s.Container) 596.Setup(s => s.Container) 629.Setup(s => s.Container) 660.Setup(s => s.Container) 691.Setup(s => s.Container) 724.Setup(s => s.Container) 755.Setup(s => s.Container) 790.Setup(s => s.Container) 838.Setup(s => s.Container) 1772.Setup(s => s.Container) 1825.Setup(s => s.Container) 1882.Setup(s => s.Container) 1937.Setup(s => s.Container) 1994.Setup(s => s.Container) 2056.Setup(s => s.Container) 2121.Setup(s => s.Container) 2195.Setup(s => s.Container)
System\Windows\Forms\ButtonBaseTests.cs (19)
565.Setup(s => s.Container) 611.Setup(s => s.Container) 657.Setup(s => s.Container) 862.Setup(s => s.Container) 953.Setup(s => s.Container) 1506.Setup(s => s.Container) 1660.Setup(s => s.Container) 2842.Setup(s => s.Container) 2954.Setup(s => s.Container) 4389.Setup(s => s.Container) 4480.Setup(s => s.Container) 5158.Setup(s => s.Container) 5262.Setup(s => s.Container) 6273.Setup(s => s.Container) 6364.Setup(s => s.Container) 6987.Setup(s => s.Container) 7091.Setup(s => s.Container) 7417.Setup(s => s.Container) 7521.Setup(s => s.Container)
System\Windows\Forms\ButtonTests.cs (2)
2417.Setup(s => s.Container) 2506.Setup(s => s.Container)
System\Windows\Forms\ColumnHeaderTests.cs (5)
764.Setup(x => x.Container) 927.Setup(s => s.Container) 1458.Setup(s => s.Container) 1495.Setup(s => s.Container) 1533.Setup(s => s.Container)
System\Windows\Forms\ControlTests.Methods.cs (3)
2498.Setup(s => s.Container) 2549.Setup(s => s.Container) 2617.Setup(s => s.Container)
System\Windows\Forms\ControlTests.Properties.cs (16)
9292.Setup(s => s.Container) 9360.Setup(s => s.Container) 10538.Setup(s => s.Container) 10597.Setup(s => s.Container) 10619.Setup(s => s.Container) 10628.Setup(s => s.Container) 10637.Setup(s => s.Container) 10697.Setup(s => s.Container) 10731.Setup(s => s.Container) 10747.Setup(s => s.Container) 10763.Setup(s => s.Container) 10772.Setup(s => s.Container) 10905.Setup(s => s.Container) 10921.Setup(s => s.Container) 10937.Setup(s => s.Container) 10946.Setup(s => s.Container)
System\Windows\Forms\DataGridViewElementTests.cs (1)
271.Setup(s => s.Container)
System\Windows\Forms\MdiClientTests.cs (4)
345.Setup(s => s.Container) 410.Setup(s => s.Container) 837.Setup(s => s.Container) 999.Setup(s => s.Container)
System\Windows\Forms\NotifyIconTests.cs (7)
259.Setup(s => s.Container) 284.Setup(s => s.Container) 405.Setup(s => s.Container) 499.Setup(s => s.Container) 530.Setup(s => s.Container) 856.Setup(s => s.Container) 934.Setup(s => s.Container)
System\Windows\Forms\PanelTests.cs (1)
1077.Setup(s => s.Container)
System\Windows\Forms\ProgressBarTests.cs (3)
139.Setup(s => s.Container) 798.Setup(s => s.Container) 859.Setup(s => s.Container)
System\Windows\Forms\PropertyGridTests.cs (7)
2727.Setup(s => s.Container) 2791.Setup(s => s.Container) 2827.Setup(s => s.Container) 2851.Setup(s => s.Container) 2913.Setup(s => s.Container) 2947.Setup(s => s.Container) 2981.Setup(s => s.Container)
System\Windows\Forms\TabControl.ControlCollectionTests.cs (9)
658.Setup(s => s.Container) 670mockSite.Verify(s => s.Container, Times.Once()); 682.Setup(s => s.Container) 689.Setup(s => s.Container) 704mockSite.Verify(s => s.Container, Times.Never()); 715.Setup(s => s.Container) 726mockSite.Verify(s => s.Container, Times.Once()); 817.Setup(s => s.Container) 1517.Setup(s => s.Container)
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (22)
655.Setup(s => s.Container) 669mockSite.Verify(s => s.Container, Times.Once()); 681.Setup(s => s.Container) 688.Setup(s => s.Container) 705mockSite.Verify(s => s.Container, Times.Never()); 716.Setup(s => s.Container) 729mockSite.Verify(s => s.Container, Times.Once()); 823.Setup(s => s.Container) 2610.Setup(s => s.Container) 2622mockSite.Verify(s => s.Container, Times.Once()); 2634.Setup(s => s.Container) 2641.Setup(s => s.Container) 2656mockSite.Verify(s => s.Container, Times.Never()); 2667.Setup(s => s.Container) 2678mockSite.Verify(s => s.Container, Times.Once()); 2849.Setup(s => s.Container) 3397.Setup(s => s.Container) 3485.Setup(s => s.Container) 3604.Setup(s => s.Container) 3796.Setup(s => s.Container) 3882.Setup(s => s.Container) 4637.Setup(s => s.Container)
System\Windows\Forms\TabControlTests.cs (1)
197.Setup(s => s.Container)
System\Windows\Forms\TabPageTests.cs (15)
704.Setup(s => s.Container) 746.Setup(s => s.Container) 789.Setup(s => s.Container) 1161.Setup(s => s.Container) 1313.Setup(s => s.Container) 1433.Setup(s => s.Container) 1550.Setup(s => s.Container) 1691.Setup(s => s.Container) 1805.Setup(s => s.Container) 2832.Setup(s => s.Container) 2946.Setup(s => s.Container) 3065.Setup(s => s.Container) 3204.Setup(s => s.Container) 3322.Setup(s => s.Container) 3434.Setup(s => s.Container)
System\Windows\Forms\ToolStripControlHostTests.cs (22)
487.Setup(s => s.Container) 1775.Setup(s => s.Container) 1791Assert.Same(container, c.Site.Container); 1801Assert.Same(container, c.Site.Container); 1822.Setup(s => s.Container) 1831Assert.Null(oldSite.Container); 1843.Setup(s => s.Container) 1864.Setup(s => s.Container) 1886.Setup(s => s.Container) 1922.Setup(s => s.Container) 1950.Setup(s => s.Container) 1973.Setup(s => s.Container) 1991.Setup(s => s.Container) 2012.Setup(s => s.Container) 2031.Setup(s => s.Container) 2051.Setup(s => s.Container) 2073.Setup(s => s.Container) 2092.Setup(s => s.Container) 2112.Setup(s => s.Container) 2132.Setup(s => s.Container) 2164.Setup(s => s.Container) 2184.Setup(s => s.Container)
System\Windows\Forms\ToolStripDropDownTests.cs (4)
1218.Setup(s => s.Container) 1350.Setup(s => s.Container) 3722.Setup(s => s.Container) 4607.Setup(s => s.Container)
System\Windows\Forms\ToolStripItemTests.cs (15)
1157.Setup(s => s.Container) 1254.Setup(s => s.Container) 1392.Setup(s => s.Container) 2593.Setup(s => s.Container) 2679.Setup(s => s.Container) 2814.Setup(s => s.Container) 6173.Setup(s => s.Container) 6214.Setup(s => s.Container) 7696.Setup(s => s.Container) 9207.Setup(s => s.Container) 9304.Setup(s => s.Container) 9442.Setup(s => s.Container) 14868.Setup(s => s.Container) 14966.Setup(s => s.Container) 15104.Setup(s => s.Container)
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
159.Setup(s => s.Container)
System\Windows\Forms\ToolStripTests.cs (4)
1769.Setup(s => s.Container) 1900.Setup(s => s.Container) 2122.Setup(s => s.Container) 4253.Setup(s => s.Container)
System\Windows\Forms\TreeViewTests.cs (3)
530.Setup(s => s.Container) 569.Setup(s => s.Container) 6091.Setup(s => s.Container)
System\Windows\Forms\UserControlTests.cs (2)
278.Setup(s => s.Container) 369.Setup(s => s.Container)
TextBoxBaseTests.cs (2)
1462.Setup(s => s.Container) 1493.Setup(s => s.Container)
WebBrowserBaseTests.cs (2)
250.Setup(s => s.Container) 270.Setup(s => s.Container)