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