1 override of ParentInternal
System.Windows.Forms (1)
System\Windows\Forms\Form.cs (1)
1705
internal override Control?
ParentInternal
4 writes to ParentInternal
System.Windows.Forms (4)
System\Windows\Forms\Control.cs (1)
2704
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)
1715
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);
1523
if (
ParentInternal
is not null)
1538
if ((IsHandleCreated || value) &&
ParentInternal
is not null &&
ParentInternal
.Created && !_axState[s_fOwnWindow])
1983
private bool ShouldSerializeContainingControl() => ContainingControl !=
ParentInternal
;
2000
control = control.
ParentInternal
;
2075
Control? richParent =
ParentInternal
;
2146
Control? parent =
ParentInternal
;
2994
if (
ParentInternal
is null || !
ParentInternal
.IsHandleCreated)
2999
ShowPropertyPages(
ParentInternal
);
3323
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)
712
if (
ParentInternal
is { } parent)
781
if (
ParentInternal
is { } parent && parent.BackColor == BackColor)
831
:
ParentInternal
?.DataContext;
841
if (Properties.ContainsKey(s_dataContextProperty) && Equals(
ParentInternal
?.DataContext, value))
876
Control? parent =
ParentInternal
;
1044
Control? parent =
ParentInternal
;
1485
if (container.
ParentInternal
is not Control parent
1499
get => GetState(States.ValidationCancelled) || (
ParentInternal
is { } parent && parent.ValidationCancelled);
1565
:
ParentInternal
is { } parent ? parent.Cursor : AmbientPropertiesService?.Cursor ?? localDefault;
1708
Control? control =
ParentInternal
;
1719
control = control.
ParentInternal
;
1842
return GetState(States.Enabled) && (
ParentInternal
is null ||
ParentInternal
.Enabled);
1942
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Font))
2017
if (
ParentInternal
is { } parent)
2062
if (
ParentInternal
is not null &&
ParentInternal
.CanAccessProperties)
2064
localFontHeight =
ParentInternal
.FontHeight;
2095
if (
ParentInternal
is { } parent && parent.CanAccessProperties)
2320
Control? parent =
ParentInternal
;
2323
while (parent.
ParentInternal
is not null)
2325
parent = parent.
ParentInternal
;
2703
get =>
ParentInternal
;
2946
rightToLeft =
ParentInternal
?.RightToLeft ?? DefaultRightToLeft;
3232
for (Control? control = this; control is not null; control = control.
ParentInternal
)
3285
control = control.
ParentInternal
;
3297
while (control.
ParentInternal
is not null)
3299
control = control.
ParentInternal
;
3486
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.UseCompatibleTextRendering);
3533
return
ParentInternal
is null ||
ParentInternal
.Visible;
3846
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Padding))
4315
ParentInternal
?.LayoutEngine.InitLayout(this, BoundsSpecified.All);
4445
for (Control? ctl = bottom; ctl is not null; ctl = ctl.
ParentInternal
)
4495
ctl = ctl.
ParentInternal
;
4618
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Bounds);
4631
if (!Properties.ContainsKey(s_bindingManagerProperty) &&
ParentInternal
is not null && !controlIsAlreadyCreated)
5102
current = current.
ParentInternal
;
5122
Control? p = c.
ParentInternal
;
5195
if (Focused &&
ParentInternal
is not null)
5197
IContainerControl? control =
ParentInternal
.GetContainerControl();
5331
Control? c = IsContainerControl ?
ParentInternal
: this;
5335
c = c.
ParentInternal
;
5448
control = control.
ParentInternal
;
5571
if (
ParentInternal
is { } parent && parent.CanAccessProperties)
6284
control = control.
ParentInternal
;
6781
ParentInternal
?.OnChildLayoutResuming(child, performLayout);
7081
Control? parent =
ParentInternal
;
7096
if (ReflectParent ==
ParentInternal
)
7687
ParentInternal
?.OnHelpRequested(hevent);
7767
if (parentRequiresLayout &&
ParentInternal
is not null)
7773
ParentInternal
.SetState(States.LayoutIsDirty, true);
7784
ParentInternal
?.OnChildLayoutResuming(this, performLayout);
8264
Control? parent =
ParentInternal
;
8394
for (Control? c =
ParentInternal
; c is not null; c = c.
ParentInternal
)
8482
if (
ParentInternal
is not null &&
ParentInternal
.GetState(States.LayoutIsDirty))
8484
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.PreferredSize);
9873
&&
ParentInternal
is { } parent
10028
if (ContainsFocus &&
ParentInternal
is not null)
10030
IContainerControl? c =
ParentInternal
.GetContainerControl();
10077
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Bounds);
10126
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Bounds);
10156
using SuspendLayoutScope scope = new(
ParentInternal
);
10208
if (
ParentInternal
is not null)
10214
CommonProperties.xClearPreferredSizeCache(
ParentInternal
);
10220
ParentInternal
.LayoutEngine.InitLayout(this, specified);
10821
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Font))
10921
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Bounds);
11135
if (
ParentInternal
is not null)
12126
if (
ParentInternal
is not null)
12128
parentVisible =
ParentInternal
.Visible;
12700
return
ParentInternal
;
12852
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)
398
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.FlatStyle);
466
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.Image);
489
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.ImageAlign);
745
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.TextAlign);
774
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.TextImageRelation);
797
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.Text);
802
private void Animate() => Animate(!DesignMode && Visible && Enabled &&
ParentInternal
is not null);
1160
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))
149
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)
2254
using (new LayoutTransaction(
ParentInternal
, this, PropertyNames.Bounds))
3435
if ((DropDownStyle == ComboBoxStyle.Simple) &&
ParentInternal
is not null)
3439
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))
1667
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.ColumnHeadersVisible))
3356
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.RowHeadersVisible))
3404
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.RowHeadersWidth))
3591
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.ScrollBars))
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (7)
13292
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Columns);
14526
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Columns);
17571
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Rows);
26711
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.ColumnHeadersHeight))
28988
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Rows);
29038
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Rows);
29060
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Rows);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (12)
1046
if (dataGridView.EditingControl.
ParentInternal
is not null)
1063
Debug.Assert(dataGridView.EditingControl.
ParentInternal
== dataGridView.EditingPanel);
1066
Debug.Assert(dataGridView.EditingControl.
ParentInternal
is null);
1077
if (dataGridView.EditingPanel.
ParentInternal
is not null)
1079
Debug.Assert(dataGridView.EditingPanel.
ParentInternal
== dataGridView);
1082
Debug.Assert(dataGridView.EditingPanel.
ParentInternal
is null);
1085
Debug.Assert(dataGridView.EditingControl.
ParentInternal
is null);
1086
Debug.Assert(dataGridView.EditingPanel.
ParentInternal
is null);
2460
if (dgv.EditingControl.
ParentInternal
is null)
2468
Debug.Assert(dgv.EditingPanel.
ParentInternal
is null);
2474
Debug.Assert(dgv.EditingControl.
ParentInternal
== dgv.EditingPanel);
2475
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);
345
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.BorderStyle);
558
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.ImageAlign);
785
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Text))
847
internal void Animate() => Animate(!DesignMode && Visible && Enabled &&
ParentInternal
is not null);
1211
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Text))
1362
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)
415
LayoutTransaction.DoLayoutIf(AutoSize,
ParentInternal
, this, PropertyNames.DrawMode);
1841
if (
ParentInternal
is not null)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
969
private void Animate() => Animate(animate: !DesignMode && Visible && Enabled &&
ParentInternal
is not null);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (12)
2073
Control? parent = control.
ParentInternal
;
2082
parent = parent.
ParentInternal
;
2104
Control? parent1 = control1.
ParentInternal
;
2105
Control? parent2 = control2.
ParentInternal
;
2114
parent2 = parent2.
ParentInternal
;
3498
if (Disposing ||
ParentInternal
is null ||
ParentInternal
.Disposing)
3518
if (Disposing ||
ParentInternal
is null ||
ParentInternal
.Disposing)
3523
if (Visible &&
ParentInternal
is not null)
4888
while (topControl.
ParentInternal
is not null)
4890
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))
1341
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Text))
System\Windows\Forms\Controls\Splitter\Splitter.cs (5)
640
Control? parent =
ParentInternal
;
691
if (_splitTarget is null ||
ParentInternal
is null)
697
using GetDcScope dc = new(
ParentInternal
.HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
703
GC.KeepAlive(
ParentInternal
);
714
Control? parent =
ParentInternal
;
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
1979
if (IsAccessibilityObjectCreated && SelectedTab?.
ParentInternal
is TabControl)
1984
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))
168
if (
ParentInternal
is not TabControl tabControl)
196
if (
ParentInternal
is not TabControl tabControl)
239
if (
ParentInternal
is TabControl parent)
267
if (
ParentInternal
is TabControl parent)
513
c = c.
ParentInternal
;
527
if (
ParentInternal
is TabControl tabControl && tabControl.SelectedIndex >= 0)
565
if (
ParentInternal
is TabControl)
588
if (
ParentInternal
is TabControl)
609
&& (
ParentInternal
is TabControl parent && parent.Appearance == TabAppearance.Normal))
732
Control? parent =
ParentInternal
;
761
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)
364
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.BorderStyle))
727
using (LayoutTransaction.CreateTransactionIf(AutoSize,
ParentInternal
, this, PropertyNames.Multiline))
1169
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))
4132
if (
ParentInternal
is not null)
4134
IContainerControl? c =
ParentInternal
.GetContainerControl();
4539
if (
ParentInternal
is not null)
4541
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)
849
if (toolStrip.
ParentInternal
is not null)
1137
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
;
1140
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)
1707
get => base.
ParentInternal
;
3487
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;
98
ISite? site =
ParentInternal
?.Site;
105
if (RightToLeft == RightToLeft.Yes &&
ParentInternal
is not null &&
ParentInternal
.IsMirrored)
168
ISite? site =
ParentInternal
?.Site;
219
||
ParentInternal
is Form { MdiChildrenMinimizedAnchorBottom: false }
220
||
ParentInternal
?.Site?.DesignMode == true)
329
if (
ParentInternal
is not null &&
ParentInternal
.Site is not null &&
ParentInternal
.Site.DesignMode && Handle != IntPtr.Zero)
337
InvokeGotFocus(
ParentInternal
, EventArgs.Empty);
339
if (
ParentInternal
is Form parentInternalAsForm)
361
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)
853
if (activeControl.
ParentInternal
!= this)
855
if (activeControl.
ParentInternal
is null)
860
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)
958
toolStrip1.
ParentInternal
.Visible = true;
959
toolStrip2.
ParentInternal
.Visible = true;
1015
toolStrip1.
ParentInternal
.Visible = true;
1016
toolStrip2.
ParentInternal
.Visible = true;