1 override of ParentInternal
System.Windows.Forms (1)
System\Windows\Forms\Form.cs (1)
1708internal override Control? ParentInternal
4 writes to ParentInternal
System.Windows.Forms (4)
System\Windows\Forms\Control.cs (1)
2883set => ParentInternal = value;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (1)
755toolStripToDrag.ParentInternal = this;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (1)
251control.ParentInternal = _owner.ToolStripPanel;
System\Windows\Forms\Form.cs (1)
1718base.ParentInternal = value;
359 references to ParentInternal
System.Windows.Forms (359)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
130Control? parentControl = owner.ParentInternal; 393if (!this.TryGetOwnerAs(out Control? owner) || owner.ParentInternal is not { } parent)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
207if (control.ParentInternal is { } parent)
System\Windows\Forms\ActiveX\AxHost.cs (13)
406if (ParentInternal is not null) 408ParentInternal.CreateControl(true); 1523if (ParentInternal is not null) 1538if ((IsHandleCreated || value) && ParentInternal is not null && ParentInternal.Created && !_axState[s_fOwnWindow]) 1983private bool ShouldSerializeContainingControl() => ContainingControl != ParentInternal; 2000control = control.ParentInternal; 2075Control? richParent = ParentInternal; 2146Control? parent = ParentInternal; 2994if (ParentInternal is null || !ParentInternal.IsHandleCreated) 2999ShowPropertyPages(ParentInternal); 3323Control? parent = ParentInternal;
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (2)
345*phwnd = _host.ParentInternal?.HWND ?? HWND.Null; 402lpFrameInfo->hwndFrame = _host.ParentInternal?.HWND ?? HWND.Null;
System\Windows\Forms\Control.ControlCollection.cs (1)
294if (value.ParentInternal == Owner)
System\Windows\Forms\Control.cs (85)
722if (ParentInternal is { } parent) 791if (ParentInternal is { } parent && parent.BackColor == BackColor) 853: ParentInternal?.DataContext; 863if (Properties.ContainsKey(s_dataContextProperty) && Equals(ParentInternal?.DataContext, value)) 905|| (ParentInternal is { } parent && parent.ResolvedVisualStylesMode == value)) 937? ParentInternal?.ResolvedVisualStylesMode ?? DefaultVisualStylesMode 1055Control? parent = ParentInternal; 1223Control? parent = ParentInternal; 1664if (container.ParentInternal is not Control parent 1678get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1744: ParentInternal is { } parent ? parent.Cursor : AmbientPropertiesService?.Cursor ?? localDefault; 1887Control? control = ParentInternal; 1898control = control.ParentInternal; 2021return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 2121using (new LayoutTransaction(ParentInternal, this, PropertyNames.Font)) 2196if (ParentInternal is { } parent) 2241if (ParentInternal is not null && ParentInternal.CanAccessProperties) 2243localFontHeight = ParentInternal.FontHeight; 2274if (ParentInternal is { } parent && parent.CanAccessProperties) 2499Control? parent = ParentInternal; 2502while (parent.ParentInternal is not null) 2504parent = parent.ParentInternal; 2882get => ParentInternal; 3125rightToLeft = ParentInternal?.RightToLeft ?? DefaultRightToLeft; 3411for (Control? control = this; control is not null; control = control.ParentInternal) 3464control = control.ParentInternal; 3476while (control.ParentInternal is not null) 3478control = control.ParentInternal; 3665LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.UseCompatibleTextRendering); 3712return ParentInternal is null || ParentInternal.Visible; 4038using (new LayoutTransaction(ParentInternal, this, PropertyNames.Padding)) 4531ParentInternal?.LayoutEngine.InitLayout(this, BoundsSpecified.All); 4660for (Control? ctl = bottom; ctl is not null; ctl = ctl.ParentInternal) 4710ctl = ctl.ParentInternal; 4833LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 4846if (!Properties.ContainsKey(s_bindingManagerProperty) && ParentInternal is not null && !controlIsAlreadyCreated) 5325current = current.ParentInternal; 5345Control? p = c.ParentInternal; 5418if (Focused && ParentInternal is not null) 5420IContainerControl? control = ParentInternal.GetContainerControl(); 5554Control? c = IsContainerControl ? ParentInternal : this; 5558c = c.ParentInternal; 5672control = control.ParentInternal; 5795if (ParentInternal is { } parent && parent.CanAccessProperties) 6508control = control.ParentInternal; 7005ParentInternal?.OnChildLayoutResuming(child, performLayout); 7098transition.RequestAncestorLayouts(ParentInternal, this); 7116transition.RequestAncestorLayouts(ParentInternal, this); 7452== ParentInternal?.ResolvedVisualStylesMode) 7465|| ParentInternal?.EffectiveVisualStylesMode != transition.NewEffectiveVisualStylesMode)) 7596for (Control? current = target; current is not null; current = current.ParentInternal) 7606for (Control? parent = control.ParentInternal; parent is not null; parent = parent.ParentInternal) 7680Control? parent = ParentInternal; 7695if (ReflectParent == ParentInternal) 8297ParentInternal?.OnHelpRequested(hevent); 8377if (parentRequiresLayout && ParentInternal is not null) 8383ParentInternal.SetState(States.LayoutIsDirty, true); 8394ParentInternal?.OnChildLayoutResuming(this, performLayout); 8742&& ParentInternal is null) 8995Control? parent = ParentInternal; 9125for (Control? c = ParentInternal; c is not null; c = c.ParentInternal) 9213if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 9215LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.PreferredSize); 10604&& ParentInternal is { } parent 10759if (ContainsFocus && ParentInternal is not null) 10761IContainerControl? c = ParentInternal.GetContainerControl(); 10808LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 10857LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 10887using SuspendLayoutScope scope = new(ParentInternal); 10939if (ParentInternal is not null) 10945CommonProperties.xClearPreferredSizeCache(ParentInternal); 10951ParentInternal.LayoutEngine.InitLayout(this, specified); 11552using (new LayoutTransaction(ParentInternal, this, PropertyNames.Font)) 11652LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 11866if (ParentInternal is not null) 12861if (ParentInternal is not null) 12863parentVisible = ParentInternal.Visible; 13443return ParentInternal; 13595Control? controlParent = ParentInternal;
System\Windows\Forms\Control.Ime.cs (1)
46Control? parent = ParentInternal;
System\Windows\Forms\Controls\Buttons\Button.cs (4)
60if (ParentInternal is not null) 65if (ParentInternal.LayoutEngine == DefaultLayout.Instance) 67ParentInternal.LayoutEngine.InitLayout(this, BoundsSpecified.Size); 70LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.AutoSize);
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (9)
356LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.FlatStyle); 424LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.Image); 447LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.ImageAlign); 703LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.TextAlign); 732LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.TextImageRelation); 755LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.Text); 760private void Animate() => Animate(!DesignMode && Visible && Enabled && ParentInternal is not null); 1145using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Text)) 1262ParentInternal,
System\Windows\Forms\Controls\Buttons\CheckBox.cs (3)
72using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Appearance)) 186LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.CheckAlign); 457LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, nameof(ThreeState));
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (2)
42if (_owner.ParentInternal is not null) 46_owner.ParentInternal,
System\Windows\Forms\Controls\Buttons\RadioButton.cs (3)
91using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Appearance)) 493if (!_isChecked || ParentInternal is not { } parent) 516if (ParentInternal is not { } parent)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (4)
548if (ParentInternal is { } parent) 2325using (new LayoutTransaction(ParentInternal, this, PropertyNames.Bounds)) 3542if ((DropDownStyle == ComboBoxStyle.Simple) && ParentInternal is not null) 3546using var hbrush = new CreateBrushScope(ParentInternal?.BackColor ?? SystemColors.Control);
System\Windows\Forms\Controls\ComboBox\ComboBox.Modern.cs (1)
692if (ParentInternal is { } parent)
System\Windows\Forms\Controls\ComboBox\ComboBox.ModernComboAdapter.cs (3)
385Color parentColor = comboBox.ParentInternal?.BackColor 414Color parentColor = comboBox.ParentInternal?.BackColor 479: comboBox.ParentInternal?.BackColor
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (5)
1078using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.BorderStyle)) 1667using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.ColumnHeadersVisible)) 3356using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.RowHeadersVisible)) 3404using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.RowHeadersWidth)) 3591using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.ScrollBars))
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (7)
13292LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Columns); 14526LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Columns); 17571LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Rows); 26711using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.ColumnHeadersHeight)) 28988LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Rows); 29038LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Rows); 29060LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Rows);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (12)
1046if (dataGridView.EditingControl.ParentInternal is not null) 1063Debug.Assert(dataGridView.EditingControl.ParentInternal == dataGridView.EditingPanel); 1066Debug.Assert(dataGridView.EditingControl.ParentInternal is null); 1077if (dataGridView.EditingPanel.ParentInternal is not null) 1079Debug.Assert(dataGridView.EditingPanel.ParentInternal == dataGridView); 1082Debug.Assert(dataGridView.EditingPanel.ParentInternal is null); 1085Debug.Assert(dataGridView.EditingControl.ParentInternal is null); 1086Debug.Assert(dataGridView.EditingPanel.ParentInternal is null); 2460if (dgv.EditingControl.ParentInternal is null) 2468Debug.Assert(dgv.EditingPanel.ParentInternal is null); 2474Debug.Assert(dgv.EditingControl.ParentInternal == dgv.EditingPanel); 2475Debug.Assert(dgv.EditingPanel.ParentInternal == dgv);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
1265if (comboBox.ParentInternal is not null) 1267h = comboBox.ParentInternal.Handle;
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (5)
96if (ParentInternal is not null) 101if (ParentInternal.LayoutEngine == DefaultLayout.Instance) 103ParentInternal.LayoutEngine.InitLayout(this, BoundsSpecified.Size); 106LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.AutoSize); 226if (ParentInternal is { } parent)
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (3)
380ParentInternal?.BackColor ?? BackColor); 484ParentInternal?.BackColor ?? BackColor); 755if (ParentInternal is { } parent)
System\Windows\Forms\Controls\Labels\Label.cs (10)
151if (ParentInternal is not null) 153LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.AutoEllipsis); 218if (ParentInternal is not null) 220LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.BorderStyle); 345LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.BorderStyle); 558LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.ImageAlign); 785using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Text)) 847internal void Animate() => Animate(!DesignMode && Visible && Enabled && ParentInternal is not null); 1211using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Text)) 1362Control? parent = ParentInternal;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
205LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.LinkArea);
System\Windows\Forms\Controls\Labels\LinkLabel.LinkCollection.cs (3)
163LayoutTransaction.DoLayout(_owner.ParentInternal, _owner, PropertyNames.Links); 307LayoutTransaction.DoLayout(_owner.ParentInternal, _owner, PropertyNames.Links); 345LayoutTransaction.DoLayout(_owner.ParentInternal, _owner, PropertyNames.Links);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
415LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.DrawMode); 1843if (ParentInternal is not null)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
969private void Animate() => Animate(animate: !DesignMode && Visible && Enabled && ParentInternal is not null);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (12)
2073Control? parent = control.ParentInternal; 2082parent = parent.ParentInternal; 2104Control? parent1 = control1.ParentInternal; 2105Control? parent2 = control2.ParentInternal; 2114parent2 = parent2.ParentInternal; 3498if (Disposing || ParentInternal is null || ParentInternal.Disposing) 3518if (Disposing || ParentInternal is null || ParentInternal.Disposing) 3523if (Visible && ParentInternal is not null) 4888while (topControl.ParentInternal is not null) 4890topControl = topControl.ParentInternal;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
75if (_gridView is not null && _gridView.ParentInternal is not null) 77cp.Parent = _gridView.ParentInternal.Handle;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
680using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.ScrollBars)) 1377using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Text))
System\Windows\Forms\Controls\Splitter\Splitter.cs (5)
640Control? parent = ParentInternal; 691if (_splitTarget is null || ParentInternal is null) 697using GetDcScope dc = new(ParentInternal.HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE); 703GC.KeepAlive(ParentInternal); 714Control? parent = ParentInternal;
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
1989if (IsAccessibilityObjectCreated && SelectedTab?.ParentInternal is TabControl) 1994if (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)) 168if (ParentInternal is not TabControl tabControl) 196if (ParentInternal is not TabControl tabControl) 239if (ParentInternal is TabControl parent) 267if (ParentInternal is TabControl parent) 513c = c.ParentInternal; 527if (ParentInternal is TabControl tabControl && tabControl.SelectedIndex >= 0) 565if (ParentInternal is TabControl) 588if (ParentInternal is TabControl) 609&& (ParentInternal is TabControl parent && parent.Appearance == TabAppearance.Normal)) 740Control? parent = ParentInternal; 769if (ParentInternal is TabControl parent)
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (1)
55private TabControl? OwningTabControl => _owningTabPage.ParentInternal as TabControl;
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (1)
24this.TryGetOwnerAs(out TabPage? owningTabPage) ? owningTabPage.ParentInternal as TabControl : null;
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
388LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.ScrollBars);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (7)
387using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.BorderStyle)) 758controlToLayout: ParentInternal, 1443controlToLayout: ParentInternal, 1734if (ParentInternal is { } parent) 1865LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.Font); 1874LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.Bounds); 1940LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.Padding);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (10)
388if (ParentInternal is { } parent && parent.CanAccessProperties) 577DockStyle actualDock = (ParentInternal is not null) ? ParentInternal.Dock : DockStyle.Left; 596if (IsInToolStripPanel && ParentInternal is not null) 598dock = ParentInternal.Dock; // we want the orientation of the ToolStripPanel; 648using (new LayoutTransaction(ParentInternal, this, PropertyNames.Dock)) 4132if (ParentInternal is not null) 4134IContainerControl? c = ParentInternal.GetContainerControl(); 4539if (ParentInternal is not null) 4541LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Orientation);
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanel.cs (2)
101if (ParentInternal is ToolStripContainer && value == Color.Transparent) 103ParentInternal.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)
999Point parentClientPoint = (_ownerItem is ToolStripDropDownItem dropDownItem) && (ParentInternal is not null) 1000? ParentInternal.PointToClient(dropDownItem.DropDownLocation)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
323if (start is null || start.ParentInternal is null) 767activeControlInChain = activeControlInChain.ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
62get { return ParentInternal; }
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (4)
482if (e.AffectedComponent != ParentInternal && e.AffectedComponent as Control is not null) 1022if (ParentInternal is not null) 1026bounds.Width = ParentInternal.DisplayRectangle.Width; 1030bounds.Height = ParentInternal.DisplayRectangle.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
117if (Control is not null && ToolStripPanelRow is not null && Control.ParentInternal == ToolStripPanelRow.ToolStripPanel)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (2)
32if ((!ToolStripPanel.Visible || LayoutUtils.IsZeroWidthOrHeight(raftingDisplayRectangle)) && (ToolStripPanel.ParentInternal is not null)) 35displayRect.Width = ToolStripPanel.ParentInternal.DisplayRectangle.Width - (ToolStripPanel.Margin.Horizontal + ToolStripPanel.Padding.Horizontal) - Row.Margin.Horizontal;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (2)
238if (ToolStripPanel is not null && ToolStripPanel.ParentInternal is not null) 240layoutTransaction = new LayoutTransaction(ToolStripPanel, ToolStripPanel.ParentInternal, PropertyNames.Parent);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (2)
33if ((!ToolStripPanel.Visible || LayoutUtils.IsZeroWidthOrHeight(raftingDisplayRectangle)) && (ToolStripPanel.ParentInternal is not null)) 36displayRect.Height = ToolStripPanel.ParentInternal.DisplayRectangle.Height - (ToolStripPanel.Margin.Vertical + ToolStripPanel.Padding.Vertical) - Row.Margin.Vertical;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (2)
849if (toolStrip.ParentInternal is not null) 1137Control? parent = control.ParentInternal;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
465Control? parent = ParentInternal; 1140for (Control? control = this; control is not null; control = control.ParentInternal)
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
271lpFrameInfo->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)
1710get => base.ParentInternal; 3490if (_ctlClient is not null && _ctlClient.IsHandleCreated && _ctlClient.ParentInternal == this)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (35)
367if (ParentInternal is not null) 369return ParentInternal.FindForm(); 400Control? parent = ParentInternal; 487else if (_activeControl is null && ParentInternal is not null) 491cc = ParentInternal.GetContainerControl() as ContainerControl; 506Control? parent = cc.ParentInternal; 533if (value is null || (value is not null && value.ParentInternal is not null && !value.ParentInternal.IsContainerControl)) 535Debug.Assert(value is null || (value.ParentInternal is not null && this == value.ParentInternal.GetContainerControl())); 640Control? parent = containerControl.ParentInternal; 1102if (!excludedFactor.IsEmpty && ParentInternal is not null) 1113bool parentDt = ParentInternal.Site?.DesignMode ?? false; 1161group = _activeControl.ParentInternal; 1223if (ParentInternal is null) 1321Control? current = ctl.ParentInternal; 1324current = current.ParentInternal; 1361using (new LayoutTransaction(ParentInternal, this, PropertyNames.Font)) 1401using (new LayoutTransaction(ParentInternal, this, PropertyNames.Font)) 1430if (ParentInternal is not null) 1432IContainerControl? c = ParentInternal.GetContainerControl(); 1466containerControl = value.ParentInternal?.GetContainerControl() as ContainerControl; 1482while (ancestor.ParentInternal?.GetContainerControl() is ContainerControl parentContainer) 1548Control? parent = nextControlDown!.ParentInternal; 1554nextControlDown = nextControlDown.ParentInternal; 1597if (innerMostFCC.ParentInternal is not (not null and MdiClient)) 1608if (innerMostFCC.ParentInternal is not null) 1610ContainerControl? containerControl = innerMostFCC.ParentInternal.GetContainerControl() as ContainerControl; 1626pathControl = pathControl.ParentInternal; 1659|| (_activeControl?.ParentInternal is not null && !_activeControl.ParentInternal.IsContainerControl)) 1661Debug.Assert(_activeControl is null || _activeControl.ParentInternal.GetContainerControl() == this); 1754commonAncestor = commonAncestor.ParentInternal; 1909currentValidatingControl = currentValidatingControl.ParentInternal; 2008if (ParentInternal?.GetContainerControl() is IContainerControl container)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (17)
249if (ParentInternal is SplitterPanel splitterPanel) 310if (ParentInternal is SplitterPanel splitterPanel) 1146IContainerControl? c = ParentInternal?.GetContainerControl(); 1540group = ActiveControl.ParentInternal; 1812Control? parent = ParentInternal; 1816if (parent.SelectNextControl(this, forward, true, true, parent.ParentInternal is null)) 1821parent = parent.ParentInternal; 1838(!nested && ctl.ParentInternal != this)) 1859if (!forward && firstPanel is not null && ctl?.ParentInternal != firstPanel) 1892IContainerControl? c = ParentInternal?.GetContainerControl(); 1915Control? parent = ParentInternal; 1941(!nested && ctl.ParentInternal != this)) 1989if (ctl is null || (ctl.ParentInternal is not null && !ctl.ParentInternal.Visible)) 2009if (container.ParentInternal is not null) 2011IContainerControl? c = container.ParentInternal.GetContainerControl(); 2379IContainerControl? c = ParentInternal?.GetContainerControl();
System\Windows\Forms\Layout\TableLayout.cs (4)
695if (containerInfo.Container is TableLayoutPanel tlp && tlp.ParentInternal is not null && tlp.ParentInternal.LayoutEngine == DefaultLayout.Instance) 823if (containerInfo.Container is TableLayoutPanel tlp && tlp.ParentInternal is not null && tlp.ParentInternal.LayoutEngine == DefaultLayout.Instance)
System\Windows\Forms\MDI\MDIClient.cs (17)
46if (result is null && ParentInternal is not null) 48result = ParentInternal.BackgroundImage; 63if (backgroundImage is not null && ParentInternal is not null) 66if (imageLayout != ParentInternal.BackgroundImageLayout) 69return ParentInternal.BackgroundImageLayout; 98ISite? site = ParentInternal?.Site; 105if (RightToLeft == RightToLeft.Yes && ParentInternal is not null && ParentInternal.IsMirrored) 168ISite? site = ParentInternal?.Site; 219|| ParentInternal is Form { MdiChildrenMinimizedAnchorBottom: false } 220|| ParentInternal?.Site?.DesignMode == true) 329if (ParentInternal is not null && ParentInternal.Site is not null && ParentInternal.Site.DesignMode && Handle != IntPtr.Zero) 337InvokeGotFocus(ParentInternal, EventArgs.Empty); 339if (ParentInternal is Form parentInternalAsForm) 361InvokeLostFocus(ParentInternal, EventArgs.Empty);
System\Windows\Forms\Panels\Panel.cs (4)
75if (ParentInternal is not null) 80if (ParentInternal.LayoutEngine == DefaultLayout.Instance) 82ParentInternal.LayoutEngine.InitLayout(this, BoundsSpecified.Size); 85LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.AutoSize);
System\Windows\Forms\ParentBackgroundRenderer.cs (1)
28Control? parent = control.ParentInternal;
System\Windows\Forms\Scrolling\ScrollableControl.cs (3)
853if (activeControl.ParentInternal != this) 855if (activeControl.ParentInternal is null) 860bounds = RectangleToClient(activeControl.ParentInternal.RectangleToScreen(bounds));
System\Windows\Forms\ToolTip\ToolTip.cs (4)
504if (control is not null && control.ParentInternal is not null) 506while (control.ParentInternal is not null) 508control = control.ParentInternal; 1103current = current.ParentInternal;
System\Windows\Forms\UserControl.cs (2)
81Control toLayout = DesignMode || ParentInternal is null ? this : ParentInternal;