12 writes to ParentInternal
System.Windows.Forms (12)
winforms\Managed\System\WinForms\ToolStrip.cs (3)
921
toolStripGrip.
ParentInternal
= this;
1521
toolStripOverflowButton.
ParentInternal
= this;
4441
item.
ParentInternal
= this;
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (2)
152
downScrollButton.
ParentInternal
= this;
262
upScrollButton.
ParentInternal
= this;
winforms\Managed\System\WinForms\ToolStripItem.cs (2)
1827
ParentInternal
= value;
3588
this.
ParentInternal
= null;
winforms\Managed\System\WinForms\ToolStripSplitStackLayout.cs (5)
350
item.
ParentInternal
= ToolStrip;
374
item.
ParentInternal
= (item.Placement == ToolStripItemPlacement.Overflow) ? toolStrip.OverflowButton.DropDown : null;
474
item.
ParentInternal
= ToolStrip;
499
item.
ParentInternal
= (item.Placement == ToolStripItemPlacement.Overflow) ? toolStrip.OverflowButton.DropDown : null;
572
toolStrip.Items[i].
ParentInternal
= null;
189 references to ParentInternal
System.Windows.Forms (189)
winforms\Managed\System\WinForms\ToolStrip.cs (4)
1304
(lastMouseDownedItem.IsDisposed || lastMouseDownedItem.
ParentInternal
!= this)){
3292
if (Items[i] != null && Items[i].
ParentInternal
== this) {
4033
if (bounds.IntersectsWith(comparisonRect) && lastMouseActiveItem.
ParentInternal
== this) {
4041
if (DisplayedItems[i] == null || DisplayedItems[i].
ParentInternal
!= this) {
winforms\Managed\System\WinForms\ToolStripComboBox.cs (4)
522
if (
ParentInternal
!= null) {
525
Application.ThreadContext.FromCurrent().RemoveMessageFilter(
ParentInternal
.RestoreFocusFilter);
532
if (
ParentInternal
!= null) {
535
Application.ThreadContext.FromCurrent().RemoveMessageFilter(
ParentInternal
.RestoreFocusFilter);
winforms\Managed\System\WinForms\ToolStripControlHost.cs (1)
980
WindowsFormsUtils.ReadOnlyControlCollection newControls = GetControlCollection(
ParentInternal
);
winforms\Managed\System\WinForms\ToolStripDropDown.cs (2)
833
ToolStrip owner = ownerItem.
ParentInternal
;
1892
parentToolStrip = this.OwnerItem.
ParentInternal
;
winforms\Managed\System\WinForms\ToolStripDropDownButton.cs (6)
133
Debug.Assert(
ParentInternal
!= null, "Parent is null here, not going to get accurate ID");
134
openMouseId = (
ParentInternal
== null) ? (byte)0:
ParentInternal
.GetMouseId();
144
Debug.Assert(
ParentInternal
!= null, "Parent is null here, not going to get accurate ID");
145
byte closeMouseId = (
ParentInternal
== null) ? (byte)0:
ParentInternal
.GetMouseId();
winforms\Managed\System\WinForms\ToolStripDropDownItem.cs (5)
71
if (
ParentInternal
!= null) {
72
dropDown.ShowItemToolTips =
ParentInternal
.ShowItemToolTips;
112
ToolStrip parent =
ParentInternal
;
194
if (
ParentInternal
== null || !HasDropDownItems) {
692
if (this.DropDown == this.
ParentInternal
) {
winforms\Managed\System\WinForms\ToolStripGrip.cs (22)
74
if ((movingToolStrip != value) &&
ParentInternal
!= null) {
77
if (
ParentInternal
.ToolStripPanelRow == null) {
84
((ISupportToolStripPanel)this.
ParentInternal
).BeginDrag();
87
((ISupportToolStripPanel)this.
ParentInternal
).EndDrag();
95
return (
ParentInternal
== null) ? null : ((ISupportToolStripPanel)
ParentInternal
).ToolStripPanelRow;
106
if (this.
ParentInternal
!= null) {
107
if (this.
ParentInternal
.LayoutStyle == ToolStripLayoutStyle.VerticalStackWithOverflow) {
108
preferredSize = new Size(this.
ParentInternal
.Width, gripThickness);
111
preferredSize = new Size(gripThickness, this.
ParentInternal
.Height);
134
if (
ParentInternal
!= null) {
135
ParentInternal
.OnPaintGrip(e);
183
ToolStripPanelRow.ToolStripPanel.MoveControl(
ParentInternal
, /*startLocation,*/endLocation );
200
if ((
ParentInternal
!= null) && (ToolStripPanelRow != null) && (!
ParentInternal
.IsInDesignMode)) {
201
oldCursor =
ParentInternal
.Cursor;
202
SetCursor(
ParentInternal
, Cursors.SizeAll);
216
if (oldCursor != null && !
ParentInternal
.IsInDesignMode) {
217
SetCursor(
ParentInternal
,oldCursor);
230
ToolStripPanelRow.ToolStripPanel.MoveControl(
ParentInternal
, /*startLocation,*/endLocation );
233
if (!
ParentInternal
.IsInDesignMode) {
234
SetCursor(
ParentInternal
, oldCursor);
winforms\Managed\System\WinForms\ToolStripItem.cs (88)
355
if ((this.
ParentInternal
!= null) && this.
ParentInternal
.IsHandleCreated) {
356
this.
ParentInternal
.PerformLayout();
547
Control p =
ParentInternal
;
660
if (
ParentInternal
!= null) {
661
LayoutTransaction.DoLayout(this,
ParentInternal
, PropertyNames.Anchor);
687
if (
ParentInternal
!= null) {
688
LayoutTransaction.DoLayout(this,
ParentInternal
, PropertyNames.Dock);
920
if ((
ParentInternal
!= null) && (
ParentInternal
.AllowItemReorder) && (
ParentInternal
.ItemReorderDropSource != null)) {
921
return new DropSource(
ParentInternal
.ItemReorderDropSource);
997
if (
ParentInternal
!= null) {
999
ParentInternal
.DropTargetManager.EnsureRegistered(this);
1019
Control p =
ParentInternal
;
1142
if (this.
ParentInternal
== null) {
1145
return this.
ParentInternal
;
1429
Control parent =
ParentInternal
;
1465
if (
ParentInternal
!= null) {
1466
return
ParentInternal
.IsDropDown;
1759
if (
ParentInternal
!= null) {
1760
currentParent =
ParentInternal
as ToolStripDropDown;
1824
return
ParentInternal
;
2010
return (
ParentInternal
!= null) ?
ParentInternal
.Renderer : null;
2038
else if (
ParentInternal
!= null) {
2040
rightToLeft = (int)
ParentInternal
.RightToLeft;
2150
(
ParentInternal
!= null &&
ParentInternal
.IsSelectionSuspended &&
2151
ParentInternal
.LastMouseDownedItem == this));
2334
if (this.
ParentInternal
!= null) {
2336
textDirection =
ParentInternal
.TextDirection;
2412
return (
ParentInternal
!=null) && (
ParentInternal
.Visible) && Available;
2459
if (
ParentInternal
!= null) {
2460
int index =
ParentInternal
.DisplayedItems.IndexOf(this);
2461
ParentInternal
.AccessibilityNotifyClients(accEvent, index);
2466
Animate(!DesignMode && Visible && Enabled &&
ParentInternal
!= null);
2494
if (this.
ParentInternal
.Items.Contains(this) && this.
ParentInternal
.AllowItemReorder) {
2623
if (!Enabled &&
ParentInternal
!= null && !string.IsNullOrEmpty(ToolTipText)) {
2624
ParentInternal
.UpdateToolTip(this);
2636
if (!Enabled &&
ParentInternal
!= null) {
2637
ParentInternal
.UpdateToolTip(null);
2646
if (!Enabled &&
ParentInternal
!= null) {
2704
if (
ParentInternal
!= null) {
2705
return
ParentInternal
as ToolStripDropDown;
2736
if (this.
ParentInternal
!= null) {
2737
ParentInternal
.Invalidate(this.Bounds, true);
2752
if (this.
ParentInternal
!= null) {
2753
ParentInternal
.Invalidate(new Rectangle(rectangleLocation, r.Size), true);
2781
if (this.
ParentInternal
!= null) {
2782
this.
ParentInternal
.InvokePaintItem(this);
2844
if (
ParentInternal
!= null
2845
&&
ParentInternal
.CanHotTrack
2846
&&
ParentInternal
.ShouldSelectItem()) {
2851
bool autoExpand =
ParentInternal
.MenuAutoExpand;
2853
if (
ParentInternal
.LastMouseDownedItem == this) {
2861
ParentInternal
.MenuAutoExpand = autoExpand;
2884
if (
ParentInternal
!= null
2885
&&
ParentInternal
.CanHotTrack
2886
&&
ParentInternal
.ShouldSelectItem()) {
2939
bool fireMouseUp = (
ParentInternal
.LastMouseDownedItem == this);
2947
fireMouseUp =
ParentInternal
.ShouldSelectItem();
3007
LayoutTransaction.DoLayout(this.
ParentInternal
, this, PropertyNames.Bounds);
3062
ToolStrip parent =
ParentInternal
;
3229
if (
ParentInternal
!= null && !string.IsNullOrEmpty(ToolTipText)) {
3230
ParentInternal
.UpdateToolTip(this);
3238
if (
ParentInternal
!= null) {
3239
ParentInternal
.UpdateToolTip(null);
3435
if (
ParentInternal
!= null && !
ParentInternal
.IsDropDown && !(AccessibilityImprovements.Level2 && !Enabled)) {
3436
ParentInternal
.RestoreFocusInternal();
3540
if (
ParentInternal
!= null &&
ParentInternal
.IsSelectionSuspended) {
3547
if (
ParentInternal
!= null) {
3548
ParentInternal
.NotifySelectionChange(this);
3841
ToolStrip parent =
ParentInternal
;
3908
return item.
ParentInternal
;
3932
if (
ParentInternal
!= null) {
3933
ParentInternal
.NotifySelectionChange(this);
4003
Debug.Assert(this.
ParentInternal
!= null, "Tool Strip Item Parent is null");
4004
return this.
ParentInternal
;
4333
ToolStrip parent = Owner.
ParentInternal
;
4404
if (Owner.
ParentInternal
!= null &&
4405
Owner.
ParentInternal
.Visible) {
4406
return new Rectangle(Owner.
ParentInternal
.PointToScreen(bounds.Location), bounds.Size);
4648
return (ownerItem != null) ? ownerItem.
ParentInternal
: null;
winforms\Managed\System\WinForms\ToolStripItemCollection.cs (8)
429
parent = item.
ParentInternal
;
504
if (value.
ParentInternal
!= null) {
505
int indexOfItem = value.
ParentInternal
.Items.IndexOf(value);
507
value.
ParentInternal
.Items.RemoveAt(indexOfItem);
522
if (value.
ParentInternal
!= null) {
523
int indexOfItem = value.
ParentInternal
.Items.IndexOf(value);
526
value.
ParentInternal
.Items.RemoveAt(indexOfItem);
528
if ((value.
ParentInternal
== owner) && (index > indexOfItem)) {
winforms\Managed\System\WinForms\ToolStripItemRenderEventArgs.cs (1)
54
return item.
ParentInternal
;
winforms\Managed\System\WinForms\ToolStripLabel.cs (3)
344
if (
ParentInternal
!= null) {
346
ParentInternal
.SetFocusUnsafe();
347
ParentInternal
.SelectNextToolStripItem(this, /*forward=*/true);
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (18)
506
LayoutTransaction.DoLayout(this.
ParentInternal
, this, "ShortcutKeys");
530
ToolStripDropDown parent = this.
ParentInternal
as ToolStripDropDown;
562
ToolStripDropDown parent = this.
ParentInternal
as ToolStripDropDown;
579
return (this.
ParentInternal
as ToolStripDropDown == null);
854
if (Enabled &&
ParentInternal
!= null &&
ParentInternal
.MenuAutoExpand && HasDropDownItems) {
923
if (
ParentInternal
!= null) {
924
ParentInternal
.MenuAutoExpand = true;
976
Debug.Assert(
ParentInternal
!= null, "Parent is null here, not going to get accurate ID");
977
openMouseId = (
ParentInternal
== null) ? (byte)0:
ParentInternal
.GetMouseId();
984
Debug.Assert(
ParentInternal
!= null, "Parent is null here, not going to get accurate ID");
985
byte closeMouseId = (
ParentInternal
== null) ? (byte)0:
ParentInternal
.GetMouseId();
1004
Debug.Assert(this.
ParentInternal
!= null, "Why is parent null");
1007
if (this.
ParentInternal
!= null && this.
ParentInternal
.MenuAutoExpand && Selected) {
1398
if (InTransition && toolStrip == fromItem.
ParentInternal
) {
winforms\Managed\System\WinForms\ToolStripOverflowButton.cs (10)
68
return this.
ParentInternal
.OverflowItems.Count > 0;
108
if (this.
ParentInternal
!= null) {
109
if (this.
ParentInternal
.Orientation == Orientation.Horizontal) {
121
if (
ParentInternal
!= null &&
ParentInternal
.LayoutEngine is ToolStripSplitStackLayout) {
123
if (
ParentInternal
.Orientation == Orientation.Horizontal) {
124
bounds.Height =
ParentInternal
.Height;
128
bounds.Width =
ParentInternal
.Width;
137
if (this.
ParentInternal
!= null) {
138
ToolStripRenderer renderer = this.
ParentInternal
.Renderer;
winforms\Managed\System\WinForms\ToolStripProfessionalRenderer.cs (1)
658
ToolStripDropDownMenu dropDownMenu = item.
ParentInternal
as ToolStripDropDownMenu;
winforms\Managed\System\WinForms\ToolStripRenderEventArgs.cs (1)
111
if (ownerItem !=null && ownerItem.
ParentInternal
!= null && !ownerItem.IsOnDropDown) {
winforms\Managed\System\WinForms\ToolStripScrollButton.cs (3)
154
preferredSize.Width = (
ParentInternal
!= null) ?
ParentInternal
.Width - 2 : preferredSize.Width; // Two for border
159
ToolStripDropDownMenu parent = this.
ParentInternal
as ToolStripDropDownMenu;
winforms\Managed\System\WinForms\ToolStripSeparator.cs (3)
283
ToolStrip parent = this.
ParentInternal
;
409
ToolStrip parent = this.
ParentInternal
;
441
if (this.Owner != null && this.
ParentInternal
!= null) {
winforms\Managed\System\WinForms\ToolStripSplitButton.cs (7)
518
Debug.Assert(
ParentInternal
!= null, "Parent is null here, not going to get accurate ID");
519
openMouseId = (
ParentInternal
== null) ? (byte)0:
ParentInternal
.GetMouseId();
546
Debug.Assert(
ParentInternal
!= null, "Parent is null here, not going to get accurate ID");
547
byte closeMouseId = (
ParentInternal
== null) ? (byte)0:
ParentInternal
.GetMouseId();
764
return owner.
ParentInternal
;
winforms\Managed\System\WinForms\ToolStripStatusLabel.cs (2)
179
if (
ParentInternal
!= null) {
180
LayoutTransaction.DoLayout(
ParentInternal
, this, PropertyNames.Spring);