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