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