1 override of ParentInternal
System.Windows.Forms (1)
System\Windows\Forms\Form.cs (1)
1709internal override Control? ParentInternal
4 writes to ParentInternal
System.Windows.Forms (4)
System\Windows\Forms\Control.cs (1)
2685set => 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)
1719base.ParentInternal = value;
337 references to ParentInternal
System.Windows.Forms (333)
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); 1526if (ParentInternal is not null) 1541if ((IsHandleCreated || value) && ParentInternal is not null && ParentInternal.Created && !_axState[s_fOwnWindow]) 1986private bool ShouldSerializeContainingControl() => ContainingControl != ParentInternal; 2003control = control.ParentInternal; 2078Control? richParent = ParentInternal; 2149Control? parent = ParentInternal; 2997if (ParentInternal is null || !ParentInternal.IsHandleCreated) 3002ShowPropertyPages(ParentInternal); 3326Control? 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 (75)
686if (ParentInternal is { } parent) 755if (ParentInternal is { } parent && parent.BackColor == BackColor) 805: ParentInternal?.DataContext; 815if (Properties.ContainsKey(s_dataContextProperty) && Equals(ParentInternal?.DataContext, value)) 850Control? parent = ParentInternal; 1018Control? parent = ParentInternal; 1466if (container.ParentInternal is not Control parent 1480get => GetState(States.ValidationCancelled) || (ParentInternal is { } parent && parent.ValidationCancelled); 1546: ParentInternal is { } parent ? parent.Cursor : AmbientPropertiesService?.Cursor ?? localDefault; 1689Control? control = ParentInternal; 1700control = control.ParentInternal; 1823return GetState(States.Enabled) && (ParentInternal is null || ParentInternal.Enabled); 1923using (new LayoutTransaction(ParentInternal, this, PropertyNames.Font)) 1998if (ParentInternal is { } parent) 2043if (ParentInternal is not null && ParentInternal.CanAccessProperties) 2045localFontHeight = ParentInternal.FontHeight; 2076if (ParentInternal is { } parent && parent.CanAccessProperties) 2301Control? parent = ParentInternal; 2304while (parent.ParentInternal is not null) 2306parent = parent.ParentInternal; 2684get => ParentInternal; 2927rightToLeft = ParentInternal?.RightToLeft ?? DefaultRightToLeft; 3213for (Control? control = this; control is not null; control = control.ParentInternal) 3266control = control.ParentInternal; 3278while (control.ParentInternal is not null) 3280control = control.ParentInternal; 3467LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.UseCompatibleTextRendering); 3514return ParentInternal is null || ParentInternal.Visible; 3827using (new LayoutTransaction(ParentInternal, this, PropertyNames.Padding)) 4296ParentInternal?.LayoutEngine.InitLayout(this, BoundsSpecified.All); 4426for (Control? ctl = bottom; ctl is not null; ctl = ctl.ParentInternal) 4476ctl = ctl.ParentInternal; 4599LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 4612if (!Properties.ContainsKey(s_bindingManagerProperty) && ParentInternal is not null && !controlIsAlreadyCreated) 5083current = current.ParentInternal; 5103Control? p = c.ParentInternal; 5176if (Focused && ParentInternal is not null) 5178IContainerControl? control = ParentInternal.GetContainerControl(); 5312Control? c = IsContainerControl ? ParentInternal : this; 5316c = c.ParentInternal; 5429control = control.ParentInternal; 5552if (ParentInternal is { } parent && parent.CanAccessProperties) 6263control = control.ParentInternal; 6760ParentInternal?.OnChildLayoutResuming(child, performLayout); 7060Control? parent = ParentInternal; 7075if (ReflectParent == ParentInternal) 7668ParentInternal?.OnHelpRequested(hevent); 7748if (parentRequiresLayout && ParentInternal is not null) 7754ParentInternal.SetState(States.LayoutIsDirty, true); 7765ParentInternal?.OnChildLayoutResuming(this, performLayout); 8245Control? parent = ParentInternal; 8375for (Control? c = ParentInternal; c is not null; c = c.ParentInternal) 8463if (ParentInternal is not null && ParentInternal.GetState(States.LayoutIsDirty)) 8465LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.PreferredSize); 9855&& ParentInternal is { } parent 10010if (ContainsFocus && ParentInternal is not null) 10012IContainerControl? c = ParentInternal.GetContainerControl(); 10059LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 10108LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 10138using SuspendLayoutScope scope = new(ParentInternal); 10190if (ParentInternal is not null) 10196CommonProperties.xClearPreferredSizeCache(ParentInternal); 10202ParentInternal.LayoutEngine.InitLayout(this, specified); 10789using (new LayoutTransaction(ParentInternal, this, PropertyNames.Font)) 10889LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 11103if (ParentInternal is not null) 12094if (ParentInternal is not null) 12096parentVisible = ParentInternal.Visible; 12668return ParentInternal; 12820Control? 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 (8)
395LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.FlatStyle); 463LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.Image); 486LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.ImageAlign); 742LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.TextAlign); 771LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.TextImageRelation); 794LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.Text); 799private void Animate() => Animate(!DesignMode && Visible && Enabled && ParentInternal is not null); 1161using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Text))
System\Windows\Forms\Controls\Buttons\CheckBox.cs (2)
75using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Appearance)) 151LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.CheckAlign);
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)
89using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Appearance)) 424if (!_isChecked || ParentInternal is not { } parent) 447if (ParentInternal is not { } parent)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (3)
2256using (new LayoutTransaction(ParentInternal, this, PropertyNames.Bounds)) 3451if ((DropDownStyle == ComboBoxStyle.Simple) && ParentInternal is not null) 3455using var hbrush = new CreateBrushScope(ParentInternal?.BackColor ?? SystemColors.Control);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (5)
1078using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.BorderStyle)) 1668using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.ColumnHeadersVisible)) 3357using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.RowHeadersVisible)) 3405using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.RowHeadersWidth)) 3592using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.ScrollBars))
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (7)
13295LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Columns); 14529LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Columns); 17574LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Rows); 26714using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.ColumnHeadersHeight)) 28991LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Rows); 29041LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Rows); 29063LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Rows);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (12)
1054if (dataGridView.EditingControl.ParentInternal is not null) 1071Debug.Assert(dataGridView.EditingControl.ParentInternal == dataGridView.EditingPanel); 1074Debug.Assert(dataGridView.EditingControl.ParentInternal is null); 1085if (dataGridView.EditingPanel.ParentInternal is not null) 1087Debug.Assert(dataGridView.EditingPanel.ParentInternal == dataGridView); 1090Debug.Assert(dataGridView.EditingPanel.ParentInternal is null); 1093Debug.Assert(dataGridView.EditingControl.ParentInternal is null); 1094Debug.Assert(dataGridView.EditingPanel.ParentInternal is null); 2471if (dgv.EditingControl.ParentInternal is null) 2479Debug.Assert(dgv.EditingPanel.ParentInternal is null); 2485Debug.Assert(dgv.EditingControl.ParentInternal == dgv.EditingPanel); 2486Debug.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 (4)
96if (ParentInternal is not null) 101if (ParentInternal.LayoutEngine == DefaultLayout.Instance) 103ParentInternal.LayoutEngine.InitLayout(this, BoundsSpecified.Size); 106LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.AutoSize);
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); 347LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.BorderStyle); 560LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.ImageAlign); 787using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Text)) 849internal void Animate() => Animate(!DesignMode && Visible && Enabled && ParentInternal is not null); 1213using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Text)) 1364Control? parent = ParentInternal;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
201LayoutTransaction.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)
417LayoutTransaction.DoLayoutIf(AutoSize, ParentInternal, this, PropertyNames.DrawMode); 1843if (ParentInternal is not null)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
970private void Animate() => Animate(animate: !DesignMode && Visible && Enabled && ParentInternal is not null);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (12)
2050Control? parent = control.ParentInternal; 2059parent = parent.ParentInternal; 2081Control? parent1 = control1.ParentInternal; 2082Control? parent2 = control2.ParentInternal; 2091parent2 = parent2.ParentInternal; 3475if (Disposing || ParentInternal is null || ParentInternal.Disposing) 3495if (Disposing || ParentInternal is null || ParentInternal.Disposing) 3500if (Visible && ParentInternal is not null) 4865while (topControl.ParentInternal is not null) 4867topControl = 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)
645using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.ScrollBars)) 1346using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Text))
System\Windows\Forms\Controls\Splitter\Splitter.cs (5)
642Control? parent = ParentInternal; 693if (_splitTarget is null || ParentInternal is null) 699using GetDcScope dc = new(ParentInternal.HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE); 705GC.KeepAlive(ParentInternal); 716Control? parent = ParentInternal;
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
1986if (IsAccessibilityObjectCreated && SelectedTab?.ParentInternal is TabControl) 1991if (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)) 171if (ParentInternal is not TabControl tabControl) 199if (ParentInternal is not TabControl tabControl) 242if (ParentInternal is TabControl parent) 270if (ParentInternal is TabControl parent) 516c = c.ParentInternal; 530if (ParentInternal is TabControl tabControl && tabControl.SelectedIndex >= 0) 568if (ParentInternal is TabControl) 591if (ParentInternal is TabControl) 612&& (ParentInternal is TabControl parent && parent.Appearance == TabAppearance.Normal)) 737Control? parent = ParentInternal; 766if (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\TextBoxBase.cs (3)
367using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.BorderStyle)) 732using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.Multiline)) 1175using (LayoutTransaction.CreateTransactionIf(AutoSize, ParentInternal, this, PropertyNames.WordWrap))
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)) 4138if (ParentInternal is not null) 4140IContainerControl? c = ParentInternal.GetContainerControl(); 4545if (ParentInternal is not null) 4547LayoutTransaction.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)
850if (toolStrip.ParentInternal is not null) 1138Control? parent = control.ParentInternal;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.DirectionButtonAccessibleObject.cs (1)
46return owner.ParentInternal?.RectangleToScreen(bounds) ?? Rectangle.Empty;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
465Control? parent = ParentInternal; 1146for (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)
1711get => base.ParentInternal; 3502if (_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; 1803Control? parent = ParentInternal; 1807if (parent.SelectNextControl(this, forward, true, true, parent.ParentInternal is null)) 1812parent = parent.ParentInternal; 1829(!nested && ctl.ParentInternal != this)) 1850if (!forward && firstPanel is not null && ctl?.ParentInternal != firstPanel) 1883IContainerControl? c = ParentInternal?.GetContainerControl(); 1906Control? parent = ParentInternal; 1932(!nested && ctl.ParentInternal != this)) 1980if (ctl is null || (ctl.ParentInternal is not null && !ctl.ParentInternal.Visible)) 2000if (container.ParentInternal is not null) 2002IContainerControl? c = container.ParentInternal.GetContainerControl(); 2370IContainerControl? 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; 100ISite? site = ParentInternal?.Site; 107if (RightToLeft == RightToLeft.Yes && ParentInternal is not null && ParentInternal.IsMirrored) 170ISite? site = ParentInternal?.Site; 221|| ParentInternal is Form { MdiChildrenMinimizedAnchorBottom: false } 222|| ParentInternal?.Site?.DesignMode == true) 331if (ParentInternal is not null && ParentInternal.Site is not null && ParentInternal.Site.DesignMode && Handle != IntPtr.Zero) 339InvokeGotFocus(ParentInternal, EventArgs.Empty); 341if (ParentInternal is Form parentInternalAsForm) 363InvokeLostFocus(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\Scrolling\ScrollableControl.cs (3)
855if (activeControl.ParentInternal != this) 857if (activeControl.ParentInternal is null) 862bounds = 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; 1099current = current.ParentInternal;
System\Windows\Forms\UserControl.cs (2)
81Control toLayout = DesignMode || ParentInternal is null ? this : ParentInternal;
System.Windows.Forms.Tests (4)
System\Windows\Forms\ControlTests.cs (4)
957toolStrip1.ParentInternal.Visible = true; 958toolStrip2.ParentInternal.Visible = true; 1014toolStrip1.ParentInternal.Visible = true; 1015toolStrip2.ParentInternal.Visible = true;