45 references to GetContainerControl
System.Windows.Forms (30)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (1)
400if (parent.GetContainerControl() is not ContainerControl container)
System\Windows\Forms\Control.ControlCollection.cs (1)
305if (Owner.GetContainerControl() is ContainerControl cc)
System\Windows\Forms\Control.cs (6)
1391if (GetContainerControl() is not ContainerControl container || !CausesValidation) 1399|| parent.GetContainerControl() is not ContainerControl parentContainer) 5110IContainerControl? control = ParentInternal.GetContainerControl(); 9858IContainerControl? c = GetContainerControl(); 9938IContainerControl? c = ParentInternal.GetContainerControl(); 11951IContainerControl? c = GetContainerControl();
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
1535IContainerControl? c = GetContainerControl();
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
1058if (dataGridView.GetContainerControl() is ContainerControl cc && (dataGridView.EditingControl == cc.ActiveControl || dataGridView.EditingControl.Contains(cc.ActiveControl)))
System\Windows\Forms\Controls\TabControl\TabControl.cs (3)
1847IContainerControl? c = GetContainerControl(); 1861IContainerControl? c = GetContainerControl(); 1975IContainerControl? c = GetContainerControl();
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4133IContainerControl? c = ParentInternal.GetContainerControl();
System\Windows\Forms\Layout\Containers\ContainerControl.cs (12)
404containerControl = parent.GetContainerControl() as ContainerControl; 492cc = ParentInternal.GetContainerControl() as ContainerControl; 514cc = parent.GetContainerControl() as ContainerControl; 536Debug.Assert(value is null || (value.ParentInternal is not null && this == value.ParentInternal.GetContainerControl())); 650containerControl = parent.GetContainerControl() as ContainerControl; 1184if (GetContainerControl() is ContainerControl && charCode != ' ' && ProcessMnemonic(charCode)) 1439IContainerControl? c = ParentInternal.GetContainerControl(); 1473containerControl = value.ParentInternal?.GetContainerControl() as ContainerControl; 1489while (ancestor.ParentInternal?.GetContainerControl() is ContainerControl parentContainer) 1617ContainerControl? containerControl = innerMostFCC.ParentInternal.GetContainerControl() as ContainerControl; 1668Debug.Assert(_activeControl is null || _activeControl.ParentInternal.GetContainerControl() == this); 2018if (ParentInternal?.GetContainerControl() is IContainerControl container)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (4)
1146IContainerControl? c = ParentInternal?.GetContainerControl(); 1883IContainerControl? c = ParentInternal?.GetContainerControl(); 2002IContainerControl? c = container.ParentInternal.GetContainerControl(); 2370IContainerControl? c = ParentInternal?.GetContainerControl();
System.Windows.Forms.Tests (15)
System\Windows\Forms\ControlTests.Methods.cs (15)
2152Assert.Null(control.GetContainerControl()); 2153Assert.Null(parent.GetContainerControl()); 2154Assert.Null(grandparent.GetContainerControl()); 2173Assert.Same(grandparent, control.GetContainerControl()); 2174Assert.Same(grandparent, parent.GetContainerControl()); 2175Assert.Same(grandparent, grandparent.GetContainerControl()); 2190Assert.Same(grandparent, control.GetContainerControl()); 2191Assert.Same(grandparent, grandparent.Panel1.GetContainerControl()); 2192Assert.Same(greatGrandparent, grandparent.GetContainerControl()); 2212Assert.Same(greatGrandparent, control.GetContainerControl()); 2213Assert.Same(greatGrandparent, parent.GetContainerControl()); 2214Assert.Same(greatGrandparent, grandparent.GetContainerControl()); 2234Assert.Same(greatGrandparent, control.GetContainerControl()); 2235Assert.Same(greatGrandparent, parent.GetContainerControl()); 2236Assert.Same(greatGrandparent, grandparent.GetContainerControl());