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)
1390if (GetContainerControl() is not ContainerControl container || !CausesValidation) 1398|| parent.GetContainerControl() is not ContainerControl parentContainer) 5069IContainerControl? control = ParentInternal.GetContainerControl(); 9825IContainerControl? c = GetContainerControl(); 9905IContainerControl? c = ParentInternal.GetContainerControl(); 11919IContainerControl? c = GetContainerControl();
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
1534IContainerControl? 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)
4135IContainerControl? 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)
2143Assert.Null(control.GetContainerControl()); 2144Assert.Null(parent.GetContainerControl()); 2145Assert.Null(grandparent.GetContainerControl()); 2164Assert.Same(grandparent, control.GetContainerControl()); 2165Assert.Same(grandparent, parent.GetContainerControl()); 2166Assert.Same(grandparent, grandparent.GetContainerControl()); 2181Assert.Same(grandparent, control.GetContainerControl()); 2182Assert.Same(grandparent, grandparent.Panel1.GetContainerControl()); 2183Assert.Same(greatGrandparent, grandparent.GetContainerControl()); 2203Assert.Same(greatGrandparent, control.GetContainerControl()); 2204Assert.Same(greatGrandparent, parent.GetContainerControl()); 2205Assert.Same(greatGrandparent, grandparent.GetContainerControl()); 2225Assert.Same(greatGrandparent, control.GetContainerControl()); 2226Assert.Same(greatGrandparent, parent.GetContainerControl()); 2227Assert.Same(greatGrandparent, grandparent.GetContainerControl());