45 references to GetContainerControl
System.Windows.Forms (30)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (1)
399
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)
5109
IContainerControl? control = ParentInternal.
GetContainerControl
();
9857
IContainerControl? c =
GetContainerControl
();
9937
IContainerControl? c = ParentInternal.
GetContainerControl
();
11950
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
();
1982
IContainerControl? c =
GetContainerControl
();
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4133
IContainerControl? c = ParentInternal.
GetContainerControl
();
System\Windows\Forms\Layout\Containers\ContainerControl.cs (12)
403
containerControl = parent.
GetContainerControl
() as ContainerControl;
491
cc = ParentInternal.
GetContainerControl
() as ContainerControl;
513
cc = parent.
GetContainerControl
() as ContainerControl;
535
Debug.Assert(value is null || (value.ParentInternal is not null && this == value.ParentInternal.
GetContainerControl
()));
649
containerControl = parent.
GetContainerControl
() as ContainerControl;
1183
if (
GetContainerControl
() is ContainerControl && charCode != ' ' && ProcessMnemonic(charCode))
1438
IContainerControl? c = ParentInternal.
GetContainerControl
();
1472
containerControl = value.ParentInternal?.
GetContainerControl
() as ContainerControl;
1488
while (ancestor.ParentInternal?.
GetContainerControl
() is ContainerControl parentContainer)
1616
ContainerControl? containerControl = innerMostFCC.ParentInternal.
GetContainerControl
() as ContainerControl;
1667
Debug.Assert(_activeControl is null || _activeControl.ParentInternal.
GetContainerControl
() == this);
2017
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)
2110
Assert.Null(control.
GetContainerControl
());
2111
Assert.Null(parent.
GetContainerControl
());
2112
Assert.Null(grandparent.
GetContainerControl
());
2131
Assert.Same(grandparent, control.
GetContainerControl
());
2132
Assert.Same(grandparent, parent.
GetContainerControl
());
2133
Assert.Same(grandparent, grandparent.
GetContainerControl
());
2148
Assert.Same(grandparent, control.
GetContainerControl
());
2149
Assert.Same(grandparent, grandparent.Panel1.
GetContainerControl
());
2150
Assert.Same(greatGrandparent, grandparent.
GetContainerControl
());
2170
Assert.Same(greatGrandparent, control.
GetContainerControl
());
2171
Assert.Same(greatGrandparent, parent.
GetContainerControl
());
2172
Assert.Same(greatGrandparent, grandparent.
GetContainerControl
());
2192
Assert.Same(greatGrandparent, control.
GetContainerControl
());
2193
Assert.Same(greatGrandparent, parent.
GetContainerControl
());
2194
Assert.Same(greatGrandparent, grandparent.
GetContainerControl
());