12 writes to ParentInternal
System.Windows.Forms (12)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
828ParentInternal = this, 1398ParentInternal = this, 4450item.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)
1486set => ParentInternal = value; 3241ParentInternal = 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)
1192(_lastMouseDownedItem.IsDisposed || _lastMouseDownedItem.ParentInternal != this)) 3258if (Items[i] is not null && Items[i].ParentInternal == this) 3993if (bounds.IntersectsWith(comparisonRect) && _lastMouseActiveItem.ParentInternal == this) 4002if (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)
719ToolStrip? owner = _ownerItem.ParentInternal; 1809ToolStrip? 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)
292if (ParentInternal is not null && ParentInternal.IsHandleCreated) 294ParentInternal.PerformLayout(); 522Control? parent = ParentInternal; 617if (ParentInternal is not null) 619LayoutTransaction.DoLayout(this, ParentInternal, PropertyNames.Anchor); 645if (ParentInternal is not null) 647LayoutTransaction.DoLayout(this, ParentInternal, PropertyNames.Dock); 857ParentInternal?.DropTargetManager.EnsureRegistered(); 876Control? parent = ParentInternal; 975IArrangedElement? IArrangedElement.Container => ParentInternal ?? Owner; 1210ToolStrip? parent = ParentInternal; 1233if (ParentInternal is not null) 1235return ParentInternal.IsDropDown; 1438if (ParentInternal is not null) 1440currentParent = ParentInternal as ToolStripDropDown; 1485get => ParentInternal; 1639return ParentInternal?.Renderer; 1666else if (ParentInternal is not null) 1669rightToLeft = ParentInternal.RightToLeft; 1782(ParentInternal is not null && ParentInternal.IsSelectionSuspended && 1783ParentInternal.LastMouseDownedItem == this)); 1931if (ParentInternal is not null) 1934textDirection = ParentInternal.TextDirection; 2009get => (ParentInternal is not null) && (ParentInternal.Visible) && Available; 2040if (ParentInternal is not null) 2042int index = ParentInternal.DisplayedItems.IndexOf(this); 2043ParentInternal.AccessibilityNotifyClients(accEvent, index); 2048=> Animate(!DesignMode && Visible && Enabled && ParentInternal is not null); 2081if (ParentInternal is not null && ParentInternal.Items.Contains(this) && ParentInternal.AllowItemReorder) 2246=> ParentInternal is not null && ParentInternal.AllowItemReorder && ParentInternal.ItemReorderDropSource is not null 2247? new DropSource(ParentInternal.ItemReorderDropSource, dataObject, dragImage, cursorOffset, useDefaultDragImage) 2266if (!Enabled && ParentInternal is not null && !string.IsNullOrEmpty(ToolTipText)) 2268ParentInternal.UpdateToolTip(this); 2283if (!Enabled && ParentInternal is not null) 2285ParentInternal.UpdateToolTip(item: null); 2297if (!Enabled && ParentInternal is not null) 2354if (ParentInternal is not null) 2356return ParentInternal as ToolStripDropDown; 2386public void Invalidate() => ParentInternal?.Invalidate(Bounds, true); 2397ParentInternal?.Invalidate(new Rectangle(rectangleLocation, r.Size), true); 2425internal void InvokePaint() => ParentInternal?.InvokePaintItem(this); 2480if (ParentInternal is not null 2481&& ParentInternal.CanHotTrack 2482&& ParentInternal.ShouldSelectItem()) 2488bool autoExpand = ParentInternal.MenuAutoExpand; 2490if (ParentInternal.LastMouseDownedItem == this) 2500ParentInternal.MenuAutoExpand = autoExpand; 2522if (ParentInternal is not null 2523&& ParentInternal.CanHotTrack 2524&& ParentInternal.ShouldSelectItem()) 2583bool fireMouseUp = (ParentInternal?.LastMouseDownedItem == this); 2592fireMouseUp = ParentInternal is not null && ParentInternal.ShouldSelectItem(); 2658LayoutTransaction.DoLayout(ParentInternal, this, PropertyNames.Bounds); 2688ToolStrip? parent = ParentInternal; 2872if (ParentInternal is not null && !string.IsNullOrEmpty(ToolTipText)) 2874ParentInternal.UpdateToolTip(this); 2881protected virtual void OnMouseLeave(EventArgs e) => ParentInternal?.UpdateToolTip(item: null); 3076if (ParentInternal is not null && !ParentInternal.IsDropDown && Enabled) 3078ParentInternal.RestoreFocusInternal(); 3173if (ParentInternal is not null && ParentInternal.IsSelectionSuspended) 3181ParentInternal?.NotifySelectionChange(this); 3475ToolStrip? parent = ParentInternal; 3559return item.ParentInternal; 3584ParentInternal?.NotifySelectionChange(this); 3648Debug.Assert(ParentInternal is not null, "Tool Strip Item Parent is null"); 3649return ParentInternal; 3675internal 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)
382ToolStrip? parent = item.ParentInternal; 466if (value.ParentInternal is not null) 468int indexOfItem = value.ParentInternal.Items.IndexOf(value); 471value.ParentInternal.Items.RemoveAt(indexOfItem); 487if (value.ParentInternal is not null) 489int indexOfItem = value.ParentInternal.Items.IndexOf(value); 493value.ParentInternal.Items.RemoveAt(indexOfItem); 495if ((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)
402LayoutTransaction.DoLayout(ParentInternal, this, "ShortcutKeys"); 432if (ParentInternal is ToolStripDropDown parent) 462if (ParentInternal is ToolStripDropDown parent) 474internal bool IsTopLevel => ParentInternal as ToolStripDropDown is null; 754if (!Enabled || ParentInternal is null || !ParentInternal.MenuAutoExpand || !HasDropDownItems) 828if (ParentInternal is not null) 830ParentInternal.MenuAutoExpand = true; 882Debug.Assert(ParentInternal is not null, "Parent is null here, not going to get accurate ID"); 883_openMouseId = (ParentInternal is null) ? (byte)0 : ParentInternal.GetMouseId(); 890Debug.Assert(ParentInternal is not null, "Parent is null here, not going to get accurate ID"); 891byte closeMouseId = (ParentInternal is null) ? (byte)0 : ParentInternal.GetMouseId(); 905Debug.Assert(ParentInternal is not null, "Why is parent null"); 908if (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);