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