1 override of ParentInternal
System.Windows.Forms (1)
System\Windows\Forms\Form.cs (1)
1709
internal override Control?
ParentInternal
4 writes to ParentInternal
System.Windows.Forms (4)
System\Windows\Forms\Control.cs (1)
2685
set =>
ParentInternal
= value;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (1)
755
toolStripToDrag.
ParentInternal
= this;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (1)
251
control.
ParentInternal
= _owner.ToolStripPanel;
System\Windows\Forms\Form.cs (1)
1719
base.
ParentInternal
= value;
337 references to ParentInternal
System.Windows.Forms (333)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
130
Control? parentControl = owner.
ParentInternal
;
393
if (!this.TryGetOwnerAs(out Control? owner) || owner.
ParentInternal
is not { } parent)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
207
if (control.
ParentInternal
is { } parent)
System\Windows\Forms\ActiveX\AxHost.cs (13)
406
if (
ParentInternal
is not null)
408
ParentInternal
.CreateControl(true);
1526
if (
ParentInternal
is not null)
1541
if ((IsHandleCreated || value) &&
ParentInternal
is not null &&
ParentInternal
.Created && !_axState[s_fOwnWindow])
1986
private bool ShouldSerializeContainingControl() => ContainingControl !=
ParentInternal
;
2003
control = control.
ParentInternal
;
2078
Control? richParent =
ParentInternal
;
2149
Control? parent =
ParentInternal
;
2997
if (
ParentInternal
is null || !
ParentInternal
.IsHandleCreated)
3002
ShowPropertyPages(
ParentInternal
);
3326
Control? parent =
ParentInternal
;
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (2)
345
*phwnd = _host.
ParentInternal
?.HWND ?? HWND.Null;
402
lpFrameInfo->hwndFrame = _host.
ParentInternal
?.HWND ?? HWND.Null;
System\Windows\Forms\Control.ControlCollection.cs (1)
294
if (value.
ParentInternal
== Owner)
System\Windows\Forms\Control.cs (75)
686
if (
ParentInternal
is { } parent)
755
if (
ParentInternal
is { } parent && parent.BackColor == BackColor)
805
:
ParentInternal
?.DataContext;
815
if (Properties.ContainsKey(s_dataContextProperty) && Equals(
ParentInternal
?.DataContext, value))
850
Control? parent =
ParentInternal
;
1018
Control? parent =
ParentInternal
;
1466
if (container.
ParentInternal
is not Control parent
1480
get => GetState(States.ValidationCancelled) || (
ParentInternal
is { } parent && parent.ValidationCancelled);
1546
:
ParentInternal
is { } parent ? parent.Cursor : AmbientPropertiesService?.Cursor ?? localDefault;
1689
Control? control =
ParentInternal
;
1700
control = control.
ParentInternal
;
1823
return GetState(States.Enabled) && (
ParentInternal
is null ||
ParentInternal
.Enabled);
1923
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Font))
1998
if (
ParentInternal
is { } parent)
2043
if (
ParentInternal
is not null &&
ParentInternal
.CanAccessProperties)
2045
localFontHeight =
ParentInternal
.FontHeight;
2076
if (
ParentInternal
is { } parent && parent.CanAccessProperties)
2301
Control? parent =
ParentInternal
;
2304
while (parent.
ParentInternal
is not null)
2306
parent = parent.
ParentInternal
;
2684
get =>
ParentInternal
;
2927
rightToLeft =
ParentInternal
?.RightToLeft ?? DefaultRightToLeft;
3213
for (Control? control = this; control is not null; control = control.
ParentInternal
)
3266
control = control.
ParentInternal
;
3278
while (control.
ParentInternal
is not null)
3280
control = control.
ParentInternal
;
3467
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.UseCompatibleTextRendering);
3514
return
ParentInternal
is null ||
ParentInternal
.Visible;
3827
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Padding))
4296
ParentInternal
?.LayoutEngine.InitLayout(this, BoundsSpecified.All);
4426
for (Control? ctl = bottom; ctl is not null; ctl = ctl.
ParentInternal
)
4476
ctl = ctl.
ParentInternal
;
4599
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Bounds);
4612
if (!Properties.ContainsKey(s_bindingManagerProperty) &&
ParentInternal
is not null && !controlIsAlreadyCreated)
5083
current = current.
ParentInternal
;
5103
Control? p = c.
ParentInternal
;
5176
if (Focused &&
ParentInternal
is not null)
5178
IContainerControl? control =
ParentInternal
.GetContainerControl();
5312
Control? c = IsContainerControl ?
ParentInternal
: this;
5316
c = c.
ParentInternal
;
5429
control = control.
ParentInternal
;
5552
if (
ParentInternal
is { } parent && parent.CanAccessProperties)
6263
control = control.
ParentInternal
;
6760
ParentInternal
?.OnChildLayoutResuming(child, performLayout);
7060
Control? parent =
ParentInternal
;
7075
if (ReflectParent ==
ParentInternal
)
7668
ParentInternal
?.OnHelpRequested(hevent);
7748
if (parentRequiresLayout &&
ParentInternal
is not null)
7754
ParentInternal
.SetState(States.LayoutIsDirty, true);
7765
ParentInternal
?.OnChildLayoutResuming(this, performLayout);
8245
Control? parent =
ParentInternal
;
8375
for (Control? c =
ParentInternal
; c is not null; c = c.
ParentInternal
)
8463
if (
ParentInternal
is not null &&
ParentInternal
.GetState(States.LayoutIsDirty))
8465
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.PreferredSize);
9855
&&
ParentInternal
is { } parent
10010
if (ContainsFocus &&
ParentInternal
is not null)
10012
IContainerControl? c =
ParentInternal
.GetContainerControl();
10059
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Bounds);
10108
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Bounds);
10138
using SuspendLayoutScope scope = new(
ParentInternal
);
10190
if (
ParentInternal
is not null)
10196
CommonProperties.xClearPreferredSizeCache(
ParentInternal
);
10202
ParentInternal
.LayoutEngine.InitLayout(this, specified);
10789
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Font))
10889
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Bounds);
11103
if (
ParentInternal
is not null)
12094
if (
ParentInternal
is not null)
12096
parentVisible =
ParentInternal
.Visible;
12668
return
ParentInternal
;
12820
Control? controlParent =
ParentInternal
;
System\Windows\Forms\Control.Ime.cs (1)
46
Control? parent =
ParentInternal
;
System\Windows\Forms\Controls\Buttons\Button.cs (4)
60
if (
ParentInternal
is not null)
65
if (
ParentInternal
.LayoutEngine == DefaultLayout.Instance)
67
ParentInternal
.LayoutEngine.InitLayout(this, BoundsSpecified.Size);
70
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.AutoSize);
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (8)
395
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.FlatStyle);
463
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.Image);
486
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.ImageAlign);
742
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.TextAlign);
771
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.TextImageRelation);
794
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.Text);
799
private void Animate() => Animate(!DesignMode && Visible && Enabled &&
ParentInternal
is not null);
1161
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Text))
System\Windows\Forms\Controls\Buttons\CheckBox.cs (2)
75
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Appearance))
151
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.CheckAlign);
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (2)
42
if (_owner.
ParentInternal
is not null)
46
_owner.
ParentInternal
,
System\Windows\Forms\Controls\Buttons\RadioButton.cs (3)
89
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Appearance))
424
if (!_isChecked ||
ParentInternal
is not { } parent)
447
if (
ParentInternal
is not { } parent)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (3)
2256
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Bounds))
3451
if ((DropDownStyle == ComboBoxStyle.Simple) &&
ParentInternal
is not null)
3455
using var hbrush = new CreateBrushScope(
ParentInternal
?.BackColor ?? SystemColors.Control);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (5)
1078
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.BorderStyle))
1668
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.ColumnHeadersVisible))
3357
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.RowHeadersVisible))
3405
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.RowHeadersWidth))
3592
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.ScrollBars))
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (7)
13295
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Columns);
14529
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Columns);
17574
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Rows);
26714
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.ColumnHeadersHeight))
28991
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Rows);
29041
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Rows);
29063
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Rows);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (12)
1054
if (dataGridView.EditingControl.
ParentInternal
is not null)
1071
Debug.Assert(dataGridView.EditingControl.
ParentInternal
== dataGridView.EditingPanel);
1074
Debug.Assert(dataGridView.EditingControl.
ParentInternal
is null);
1085
if (dataGridView.EditingPanel.
ParentInternal
is not null)
1087
Debug.Assert(dataGridView.EditingPanel.
ParentInternal
== dataGridView);
1090
Debug.Assert(dataGridView.EditingPanel.
ParentInternal
is null);
1093
Debug.Assert(dataGridView.EditingControl.
ParentInternal
is null);
1094
Debug.Assert(dataGridView.EditingPanel.
ParentInternal
is null);
2471
if (dgv.EditingControl.
ParentInternal
is null)
2479
Debug.Assert(dgv.EditingPanel.
ParentInternal
is null);
2485
Debug.Assert(dgv.EditingControl.
ParentInternal
== dgv.EditingPanel);
2486
Debug.Assert(dgv.EditingPanel.
ParentInternal
== dgv);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
1265
if (comboBox.
ParentInternal
is not null)
1267
h = comboBox.
ParentInternal
.Handle;
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
96
if (
ParentInternal
is not null)
101
if (
ParentInternal
.LayoutEngine == DefaultLayout.Instance)
103
ParentInternal
.LayoutEngine.InitLayout(this, BoundsSpecified.Size);
106
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.AutoSize);
System\Windows\Forms\Controls\Labels\Label.cs (10)
151
if (
ParentInternal
is not null)
153
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.AutoEllipsis);
218
if (
ParentInternal
is not null)
220
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.BorderStyle);
347
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.BorderStyle);
560
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.ImageAlign);
787
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Text))
849
internal void Animate() => Animate(!DesignMode && Visible && Enabled &&
ParentInternal
is not null);
1213
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Text))
1364
Control? parent =
ParentInternal
;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
201
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.LinkArea);
System\Windows\Forms\Controls\Labels\LinkLabel.LinkCollection.cs (3)
163
LayoutTransaction.DoLayout(_owner.
ParentInternal
, _owner, PropertyNames.Links);
307
LayoutTransaction.DoLayout(_owner.
ParentInternal
, _owner, PropertyNames.Links);
345
LayoutTransaction.DoLayout(_owner.
ParentInternal
, _owner, PropertyNames.Links);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
417
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.DrawMode);
1843
if (
ParentInternal
is not null)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
970
private void Animate() => Animate(animate: !DesignMode && Visible && Enabled &&
ParentInternal
is not null);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (12)
2050
Control? parent = control.
ParentInternal
;
2059
parent = parent.
ParentInternal
;
2081
Control? parent1 = control1.
ParentInternal
;
2082
Control? parent2 = control2.
ParentInternal
;
2091
parent2 = parent2.
ParentInternal
;
3475
if (Disposing ||
ParentInternal
is null ||
ParentInternal
.Disposing)
3495
if (Disposing ||
ParentInternal
is null ||
ParentInternal
.Disposing)
3500
if (Visible &&
ParentInternal
is not null)
4865
while (topControl.
ParentInternal
is not null)
4867
topControl = topControl.
ParentInternal
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
75
if (_gridView is not null && _gridView.
ParentInternal
is not null)
77
cp.Parent = _gridView.
ParentInternal
.Handle;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
645
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.ScrollBars))
1346
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Text))
System\Windows\Forms\Controls\Splitter\Splitter.cs (5)
642
Control? parent =
ParentInternal
;
693
if (_splitTarget is null ||
ParentInternal
is null)
699
using GetDcScope dc = new(
ParentInternal
.HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
705
GC.KeepAlive(
ParentInternal
);
716
Control? parent =
ParentInternal
;
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
1986
if (IsAccessibilityObjectCreated && SelectedTab?.
ParentInternal
is TabControl)
1991
if (IsAccessibilityObjectCreated && SelectedTab?.
ParentInternal
is TabControl &&
System\Windows\Forms\Controls\TabControl\TabPage.cs (13)
50
=>
ParentInternal
is TabControl tabControl && tabControl.ShowToolTips;
108
&& (
ParentInternal
is TabControl parent && parent.Appearance == TabAppearance.Normal))
171
if (
ParentInternal
is not TabControl tabControl)
199
if (
ParentInternal
is not TabControl tabControl)
242
if (
ParentInternal
is TabControl parent)
270
if (
ParentInternal
is TabControl parent)
516
c = c.
ParentInternal
;
530
if (
ParentInternal
is TabControl tabControl && tabControl.SelectedIndex >= 0)
568
if (
ParentInternal
is TabControl)
591
if (
ParentInternal
is TabControl)
612
&& (
ParentInternal
is TabControl parent && parent.Appearance == TabAppearance.Normal))
737
Control? parent =
ParentInternal
;
766
if (
ParentInternal
is TabControl parent)
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (1)
55
private TabControl? OwningTabControl => _owningTabPage.
ParentInternal
as TabControl;
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (1)
24
this.TryGetOwnerAs(out TabPage? owningTabPage) ? owningTabPage.
ParentInternal
as TabControl : null;
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (3)
367
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.BorderStyle))
732
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Multiline))
1175
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.WordWrap))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (10)
388
if (
ParentInternal
is { } parent && parent.CanAccessProperties)
577
DockStyle actualDock = (
ParentInternal
is not null) ?
ParentInternal
.Dock : DockStyle.Left;
596
if (IsInToolStripPanel &&
ParentInternal
is not null)
598
dock =
ParentInternal
.Dock; // we want the orientation of the ToolStripPanel;
648
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Dock))
4138
if (
ParentInternal
is not null)
4140
IContainerControl? c =
ParentInternal
.GetContainerControl();
4545
if (
ParentInternal
is not null)
4547
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Orientation);
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanel.cs (2)
101
if (
ParentInternal
is ToolStripContainer && value == Color.Transparent)
103
ParentInternal
.BackColor = Color.Transparent;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
690
= GetControlCollection(_control.
ParentInternal
as ToolStrip);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
999
Point parentClientPoint = (_ownerItem is ToolStripDropDownItem dropDownItem) && (
ParentInternal
is not null)
1000
?
ParentInternal
.PointToClient(dropDownItem.DropDownLocation)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
323
if (start is null || start.
ParentInternal
is null)
767
activeControlInChain = activeControlInChain.
ParentInternal
;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
62
get { return
ParentInternal
; }
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (4)
482
if (e.AffectedComponent !=
ParentInternal
&& e.AffectedComponent as Control is not null)
1022
if (
ParentInternal
is not null)
1026
bounds.Width =
ParentInternal
.DisplayRectangle.Width;
1030
bounds.Height =
ParentInternal
.DisplayRectangle.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
117
if (Control is not null && ToolStripPanelRow is not null && Control.
ParentInternal
== ToolStripPanelRow.ToolStripPanel)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (2)
32
if ((!ToolStripPanel.Visible || LayoutUtils.IsZeroWidthOrHeight(raftingDisplayRectangle)) && (ToolStripPanel.
ParentInternal
is not null))
35
displayRect.Width = ToolStripPanel.
ParentInternal
.DisplayRectangle.Width - (ToolStripPanel.Margin.Horizontal + ToolStripPanel.Padding.Horizontal) - Row.Margin.Horizontal;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (2)
238
if (ToolStripPanel is not null && ToolStripPanel.
ParentInternal
is not null)
240
layoutTransaction = new LayoutTransaction(ToolStripPanel, ToolStripPanel.
ParentInternal
, PropertyNames.Parent);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (2)
33
if ((!ToolStripPanel.Visible || LayoutUtils.IsZeroWidthOrHeight(raftingDisplayRectangle)) && (ToolStripPanel.
ParentInternal
is not null))
36
displayRect.Height = ToolStripPanel.
ParentInternal
.DisplayRectangle.Height - (ToolStripPanel.Margin.Vertical + ToolStripPanel.Padding.Vertical) - Row.Margin.Vertical;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (2)
850
if (toolStrip.
ParentInternal
is not null)
1138
Control? parent = control.
ParentInternal
;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.DirectionButtonAccessibleObject.cs (1)
46
return owner.
ParentInternal
?.RectangleToScreen(bounds) ?? Rectangle.Empty;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
465
Control? parent =
ParentInternal
;
1146
for (Control? control = this; control is not null; control = control.
ParentInternal
)
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
271
lpFrameInfo->hwndFrame = Host.
ParentInternal
is { } parent ? parent.HWND : HWND.Null;
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.ControlItemAccessibleObject.cs (3)
34
=> _control.
ParentInternal
is not null && _control.
ParentInternal
.IsHandleCreated
35
? _control.
ParentInternal
.RectangleToScreen(_controlItem.GetIconBounds(_provider.Region.Size))
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.cs (2)
271
_control.Visible && _control.
ParentInternal
is not null &&
274
_window = _provider.EnsureErrorWindow(_control.
ParentInternal
);
System\Windows\Forms\Form.cs (2)
1711
get => base.
ParentInternal
;
3502
if (_ctlClient is not null && _ctlClient.IsHandleCreated && _ctlClient.
ParentInternal
== this)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (35)
367
if (
ParentInternal
is not null)
369
return
ParentInternal
.FindForm();
400
Control? parent =
ParentInternal
;
487
else if (_activeControl is null &&
ParentInternal
is not null)
491
cc =
ParentInternal
.GetContainerControl() as ContainerControl;
506
Control? parent = cc.
ParentInternal
;
533
if (value is null || (value is not null && value.
ParentInternal
is not null && !value.
ParentInternal
.IsContainerControl))
535
Debug.Assert(value is null || (value.
ParentInternal
is not null && this == value.
ParentInternal
.GetContainerControl()));
640
Control? parent = containerControl.
ParentInternal
;
1102
if (!excludedFactor.IsEmpty &&
ParentInternal
is not null)
1113
bool parentDt =
ParentInternal
.Site?.DesignMode ?? false;
1161
group = _activeControl.
ParentInternal
;
1223
if (
ParentInternal
is null)
1321
Control? current = ctl.
ParentInternal
;
1324
current = current.
ParentInternal
;
1361
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Font))
1401
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Font))
1430
if (
ParentInternal
is not null)
1432
IContainerControl? c =
ParentInternal
.GetContainerControl();
1466
containerControl = value.
ParentInternal
?.GetContainerControl() as ContainerControl;
1482
while (ancestor.
ParentInternal
?.GetContainerControl() is ContainerControl parentContainer)
1548
Control? parent = nextControlDown!.
ParentInternal
;
1554
nextControlDown = nextControlDown.
ParentInternal
;
1597
if (innerMostFCC.
ParentInternal
is not (not null and MdiClient))
1608
if (innerMostFCC.
ParentInternal
is not null)
1610
ContainerControl? containerControl = innerMostFCC.
ParentInternal
.GetContainerControl() as ContainerControl;
1626
pathControl = pathControl.
ParentInternal
;
1659
|| (_activeControl?.
ParentInternal
is not null && !_activeControl.
ParentInternal
.IsContainerControl))
1661
Debug.Assert(_activeControl is null || _activeControl.
ParentInternal
.GetContainerControl() == this);
1754
commonAncestor = commonAncestor.
ParentInternal
;
1909
currentValidatingControl = currentValidatingControl.
ParentInternal
;
2008
if (
ParentInternal
?.GetContainerControl() is IContainerControl container)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (17)
249
if (
ParentInternal
is SplitterPanel splitterPanel)
310
if (
ParentInternal
is SplitterPanel splitterPanel)
1146
IContainerControl? c =
ParentInternal
?.GetContainerControl();
1540
group = ActiveControl.
ParentInternal
;
1803
Control? parent =
ParentInternal
;
1807
if (parent.SelectNextControl(this, forward, true, true, parent.
ParentInternal
is null))
1812
parent = parent.
ParentInternal
;
1829
(!nested && ctl.
ParentInternal
!= this))
1850
if (!forward && firstPanel is not null && ctl?.
ParentInternal
!= firstPanel)
1883
IContainerControl? c =
ParentInternal
?.GetContainerControl();
1906
Control? parent =
ParentInternal
;
1932
(!nested && ctl.
ParentInternal
!= this))
1980
if (ctl is null || (ctl.
ParentInternal
is not null && !ctl.
ParentInternal
.Visible))
2000
if (container.
ParentInternal
is not null)
2002
IContainerControl? c = container.
ParentInternal
.GetContainerControl();
2370
IContainerControl? c =
ParentInternal
?.GetContainerControl();
System\Windows\Forms\Layout\TableLayout.cs (4)
695
if (containerInfo.Container is TableLayoutPanel tlp && tlp.
ParentInternal
is not null && tlp.
ParentInternal
.LayoutEngine == DefaultLayout.Instance)
823
if (containerInfo.Container is TableLayoutPanel tlp && tlp.
ParentInternal
is not null && tlp.
ParentInternal
.LayoutEngine == DefaultLayout.Instance)
System\Windows\Forms\MDI\MDIClient.cs (17)
46
if (result is null &&
ParentInternal
is not null)
48
result =
ParentInternal
.BackgroundImage;
63
if (backgroundImage is not null &&
ParentInternal
is not null)
66
if (imageLayout !=
ParentInternal
.BackgroundImageLayout)
69
return
ParentInternal
.BackgroundImageLayout;
100
ISite? site =
ParentInternal
?.Site;
107
if (RightToLeft == RightToLeft.Yes &&
ParentInternal
is not null &&
ParentInternal
.IsMirrored)
170
ISite? site =
ParentInternal
?.Site;
221
||
ParentInternal
is Form { MdiChildrenMinimizedAnchorBottom: false }
222
||
ParentInternal
?.Site?.DesignMode == true)
331
if (
ParentInternal
is not null &&
ParentInternal
.Site is not null &&
ParentInternal
.Site.DesignMode && Handle != IntPtr.Zero)
339
InvokeGotFocus(
ParentInternal
, EventArgs.Empty);
341
if (
ParentInternal
is Form parentInternalAsForm)
363
InvokeLostFocus(
ParentInternal
, EventArgs.Empty);
System\Windows\Forms\Panels\Panel.cs (4)
75
if (
ParentInternal
is not null)
80
if (
ParentInternal
.LayoutEngine == DefaultLayout.Instance)
82
ParentInternal
.LayoutEngine.InitLayout(this, BoundsSpecified.Size);
85
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.AutoSize);
System\Windows\Forms\Scrolling\ScrollableControl.cs (3)
855
if (activeControl.
ParentInternal
!= this)
857
if (activeControl.
ParentInternal
is null)
862
bounds = RectangleToClient(activeControl.
ParentInternal
.RectangleToScreen(bounds));
System\Windows\Forms\ToolTip\ToolTip.cs (4)
504
if (control is not null && control.
ParentInternal
is not null)
506
while (control.
ParentInternal
is not null)
508
control = control.
ParentInternal
;
1099
current = current.
ParentInternal
;
System\Windows\Forms\UserControl.cs (2)
81
Control toLayout = DesignMode ||
ParentInternal
is null ? this :
ParentInternal
;
System.Windows.Forms.Tests (4)
System\Windows\Forms\ControlTests.cs (4)
957
toolStrip1.
ParentInternal
.Visible = true;
958
toolStrip2.
ParentInternal
.Visible = true;
1014
toolStrip1.
ParentInternal
.Visible = true;
1015
toolStrip2.
ParentInternal
.Visible = true;