12 writes to ParentInternal
System.Windows.Forms (12)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
790ParentInternal = this, 1360ParentInternal = this, 4339item.ParentInternal = this;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (2)
107=> _downScrollButton ??= new ToolStripScrollButton(false) { ParentInternal = this }; 201=> _upScrollButton ??= new ToolStripScrollButton(true) { ParentInternal = this };
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
1478set => ParentInternal = value; 3199ParentInternal = null;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (5)
318item.ParentInternal = ToolStrip; 347item.ParentInternal = (item.Placement == ToolStripItemPlacement.Overflow) ? toolStrip.OverflowButton.DropDown : null; 451item.ParentInternal = ToolStrip; 480item.ParentInternal = (item.Placement == ToolStripItemPlacement.Overflow) ? toolStrip.OverflowButton.DropDown : null; 551toolStrip.Items[i].ParentInternal = null;
188 references to ParentInternal
System.Windows.Forms (188)
System\Windows\Forms\Controls\Menus\MenuTimer.cs (1)
135if (InTransition && toolStrip == _fromItem?.ParentInternal)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (4)
1154(_lastMouseDownedItem.IsDisposed || _lastMouseDownedItem.ParentInternal != this)) 3144if (Items[i] is not null && Items[i].ParentInternal == this) 3880if (bounds.IntersectsWith(comparisonRect) && _lastMouseActiveItem.ParentInternal == this) 3889if (DisplayedItems[i] is null || DisplayedItems[i].ParentInternal != this)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (4)
362if (ParentInternal is not null) 364Application.ThreadContext.FromCurrent().RemoveMessageFilter(ParentInternal.RestoreFocusFilter); 373if (ParentInternal is not null) 377Application.ThreadContext.FromCurrent().RemoveMessageFilter(ParentInternal.RestoreFocusFilter);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
804ReadOnlyControlCollection? newControls = GetControlCollection(ParentInternal);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
641ToolStrip? owner = _ownerItem.ParentInternal; 1669ToolStrip? parentToolStrip = OwnerItem?.ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (6)
141Debug.Assert(ParentInternal is not null, "Parent is null here, not going to get accurate ID"); 142_openMouseId = (ParentInternal is null) ? (byte)0 : ParentInternal.GetMouseId(); 155Debug.Assert(ParentInternal is not null, "Parent is null here, not going to get accurate ID"); 156byte closeMouseId = (ParentInternal is null) ? (byte)0 : ParentInternal.GetMouseId();
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (6)
73if (ParentInternal is not null) 75_dropDown!.ShowItemToolTips = ParentInternal.ShowItemToolTips; 127ToolStrip? parent = ParentInternal; 209if (ParentInternal is null || !HasDropDownItems) 713if (DropDown == ParentInternal) 724ParentInternal?.UpdateToolTip(this, refresh: true);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (23)
37if ((_movingToolStrip != value) && ParentInternal is not null) 42if (ParentInternal.ToolStripPanelRow is null) 52((ISupportToolStripPanel)ParentInternal).BeginDrag(); 56((ISupportToolStripPanel)ParentInternal).EndDrag(); 66return (ParentInternal is null) ? null : ((ISupportToolStripPanel)ParentInternal).ToolStripPanelRow; 78if (ParentInternal is not null) 80if (ParentInternal.LayoutStyle == ToolStripLayoutStyle.VerticalStackWithOverflow) 82preferredSize = new Size(ParentInternal.Width, GripThickness); 86preferredSize = new Size(GripThickness, ParentInternal.Height); 112ParentInternal?.OnPaintGrip(e); 166ToolStripPanelRow.ToolStripPanel.MoveControl(ParentInternal, /*startLocation,*/endLocation); 185if ((ParentInternal is not null) && (ToolStripPanelRow is not null) && (!ParentInternal.IsInDesignMode)) 187_oldCursor = ParentInternal.Cursor; 188ParentInternal.Cursor = Cursors.SizeAll; 200if (_oldCursor is not null && ParentInternal is not null && !ParentInternal.IsInDesignMode) 202ParentInternal.Cursor = _oldCursor; 218ToolStripPanelRow.ToolStripPanel.MoveControl(ParentInternal, /*startLocation,*/endLocation); 221if (ParentInternal is not null && !ParentInternal.IsInDesignMode) 223ParentInternal.Cursor = _oldCursor;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (78)
290if (ParentInternal is not null && ParentInternal.IsHandleCreated) 292ParentInternal.PerformLayout(); 515Control? parent = ParentInternal; 610if (ParentInternal is not null) 612LayoutTransaction.DoLayout(this, ParentInternal, PropertyNames.Anchor); 638if (ParentInternal is not null) 640LayoutTransaction.DoLayout(this, ParentInternal, PropertyNames.Dock); 850ParentInternal?.DropTargetManager.EnsureRegistered(); 869Control? parent = ParentInternal; 966IArrangedElement? IArrangedElement.Container => ParentInternal ?? Owner; 1202ToolStrip? parent = ParentInternal; 1225if (ParentInternal is not null) 1227return ParentInternal.IsDropDown; 1430if (ParentInternal is not null) 1432currentParent = ParentInternal as ToolStripDropDown; 1477get => ParentInternal; 1623return ParentInternal?.Renderer; 1650else if (ParentInternal is not null) 1653rightToLeft = ParentInternal.RightToLeft; 1766(ParentInternal is not null && ParentInternal.IsSelectionSuspended && 1767ParentInternal.LastMouseDownedItem == this)); 1908if (ParentInternal is not null) 1911textDirection = ParentInternal.TextDirection; 1985get => (ParentInternal is not null) && (ParentInternal.Visible) && Available; 2016if (ParentInternal is not null) 2018int index = ParentInternal.DisplayedItems.IndexOf(this); 2019ParentInternal.AccessibilityNotifyClients(accEvent, index); 2024=> Animate(!DesignMode && Visible && Enabled && ParentInternal is not null); 2057if (ParentInternal is not null && ParentInternal.Items.Contains(this) && ParentInternal.AllowItemReorder) 2220=> ParentInternal is not null && ParentInternal.AllowItemReorder && ParentInternal.ItemReorderDropSource is not null 2221? new DropSource(ParentInternal.ItemReorderDropSource, dataObject, dragImage, cursorOffset, useDefaultDragImage) 2240if (!Enabled && ParentInternal is not null && !string.IsNullOrEmpty(ToolTipText)) 2242ParentInternal.UpdateToolTip(this); 2257if (!Enabled && ParentInternal is not null) 2259ParentInternal.UpdateToolTip(item: null); 2271if (!Enabled && ParentInternal is not null) 2328if (ParentInternal is not null) 2330return ParentInternal as ToolStripDropDown; 2360public void Invalidate() => ParentInternal?.Invalidate(Bounds, true); 2371ParentInternal?.Invalidate(new Rectangle(rectangleLocation, r.Size), true); 2399internal void InvokePaint() => ParentInternal?.InvokePaintItem(this); 2454if (ParentInternal is not null 2455&& ParentInternal.CanHotTrack 2456&& ParentInternal.ShouldSelectItem()) 2462bool autoExpand = ParentInternal.MenuAutoExpand; 2464if (ParentInternal.LastMouseDownedItem == this) 2474ParentInternal.MenuAutoExpand = autoExpand; 2496if (ParentInternal is not null 2497&& ParentInternal.CanHotTrack 2498&& ParentInternal.ShouldSelectItem()) 2557bool fireMouseUp = (ParentInternal?.LastMouseDownedItem == this); 2566fireMouseUp = ParentInternal is not null && ParentInternal.ShouldSelectItem(); 2632LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 2662ToolStrip? parent = ParentInternal; 2846if (ParentInternal is not null && !string.IsNullOrEmpty(ToolTipText)) 2848ParentInternal.UpdateToolTip(this); 2855protected virtual void OnMouseLeave(EventArgs e) => ParentInternal?.UpdateToolTip(item: null); 3046if (ParentInternal is not null && !ParentInternal.IsDropDown && Enabled) 3048ParentInternal.RestoreFocusInternal(); 3131if (ParentInternal is not null && ParentInternal.IsSelectionSuspended) 3139ParentInternal?.NotifySelectionChange(this); 3424ToolStrip? parent = ParentInternal; 3508return item.ParentInternal; 3533ParentInternal?.NotifySelectionChange(this); 3597Debug.Assert(ParentInternal is not null, "Tool Strip Item Parent is null"); 3598return ParentInternal; 3624internal bool IsParentAccessibilityObjectCreated => ParentInternal is not null && ParentInternal.IsAccessibilityObjectCreated;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (4)
235ToolStrip? parent = Owner.ParentInternal; 302if (Owner.ParentInternal is not null && Owner.ParentInternal.Visible) 304return new Rectangle(Owner.ParentInternal.PointToScreen(bounds.Location), bounds.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
54protected virtual ToolStrip? ParentInternal => _ownerItem?.ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (8)
389ToolStrip? parent = item.ParentInternal; 467if (value.ParentInternal is not null) 469int indexOfItem = value.ParentInternal.Items.IndexOf(value); 472value.ParentInternal.Items.RemoveAt(indexOfItem); 488if (value.ParentInternal is not null) 490int indexOfItem = value.ParentInternal.Items.IndexOf(value); 494value.ParentInternal.Items.RemoveAt(indexOfItem); 496if ((value.ParentInternal == _owner) && (index > indexOfItem))
System\Windows\Forms\Controls\ToolStrips\ToolStripItemRenderEventArgs.cs (1)
32public ToolStrip? ToolStrip => Item.ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (3)
386if (ParentInternal is not null) 390ParentInternal.SetFocusUnsafe(); 391ParentInternal.SelectNextToolStripItem(this, forward: true);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (17)
401LayoutTransaction.DoLayout(ParentInternal, this, "ShortcutKeys"); 430if (ParentInternal is ToolStripDropDown parent) 460if (ParentInternal is ToolStripDropDown parent) 472internal bool IsTopLevel => ParentInternal as ToolStripDropDown is null; 749if (!Enabled || ParentInternal is null || !ParentInternal.MenuAutoExpand || !HasDropDownItems) 823if (ParentInternal is not null) 825ParentInternal.MenuAutoExpand = true; 877Debug.Assert(ParentInternal is not null, "Parent is null here, not going to get accurate ID"); 878_openMouseId = (ParentInternal is null) ? (byte)0 : ParentInternal.GetMouseId(); 885Debug.Assert(ParentInternal is not null, "Parent is null here, not going to get accurate ID"); 886byte closeMouseId = (ParentInternal is null) ? (byte)0 : ParentInternal.GetMouseId(); 900Debug.Assert(ParentInternal is not null, "Why is parent null"); 903if (ParentInternal is not null && ParentInternal.MenuAutoExpand && Selected)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemAccessibleObject.cs (2)
63ToolStripItemCollection? displayedItems = _owningToolStripMenuItem.ParentInternal?.DisplayedItems; 98ToolStripItemCollection? displayedItems = _owningToolStripMenuItem.ParentInternal?.DisplayedItems;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (10)
45public override bool HasDropDownItems => ParentInternal is not null && ParentInternal.OverflowItems.Count > 0; 74if (ParentInternal is { } parent) 92if (ParentInternal is not null && ParentInternal.LayoutEngine is ToolStripSplitStackLayout) 94if (ParentInternal.Orientation == Orientation.Horizontal) 96bounds.Height = ParentInternal.Height; 101bounds.Width = ParentInternal.Width; 111if (ParentInternal is not null) 113ToolStripRenderer renderer = ParentInternal.Renderer;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
751if (item.ParentInternal is ToolStripDropDownMenu dropDownMenu && !dropDownMenu.ShowCheckMargin && dropDownMenu.ShowImageMargin)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (1)
106if (ownerItem is not null && ownerItem.ParentInternal is not null && !ownerItem.IsOnDropDown)
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.cs (3)
127preferredSize.Width = (ParentInternal is not null) ? ParentInternal.Width - 2 : preferredSize.Width; // Two for border 133if (ParentInternal is ToolStripDropDownMenu parent && Label.Enabled)
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (3)
171ToolStrip? parent = ParentInternal ?? Owner; 259ToolStrip? parent = ParentInternal ?? Owner; 290if (Owner is not null && ParentInternal is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (6)
427Debug.Assert(ParentInternal is not null, "Parent is null here, not going to get accurate ID"); 428_openMouseId = (ParentInternal is null) ? (byte)0 : ParentInternal.GetMouseId(); 454Debug.Assert(ParentInternal is not null, "Parent is null here, not going to get accurate ID"); 455byte closeMouseId = (ParentInternal is null) ? (byte)0 : ParentInternal.GetMouseId();
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonButtonLayout.cs (1)
34return _owner.ParentInternal;
System\Windows\Forms\Controls\ToolStrips\ToolStripStatusLabel.cs (2)
138if (ParentInternal is not null) 140LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Spring);