66 references to GetCurrentParent
System.Windows.Forms (3)
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (2)
1220
bool drawCurve = RoundedEdges && (item?.
GetCurrentParent
() is not MenuStrip);
1471
if (item.
GetCurrentParent
() is ToolStripDropDownMenu dropDownMenu)
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
679
ToolStrip? parent = item.
GetCurrentParent
();
System.Windows.Forms.Design (36)
System\Windows\Forms\Design\DesignerUtils.cs (1)
772
else if (comp is ToolStripItem item && item.
GetCurrentParent
() is null)
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (1)
281
Control? parent = item.
GetCurrentParent
();
System\Windows\Forms\Design\ToolStripDesigner.cs (3)
781
ToolStripDropDown dropDown = (ToolStripDropDown)((DesignerToolStripControlHost)comp).
GetCurrentParent
();
840
if (designerItem.
GetCurrentParent
() is ToolStripDropDown parent)
1619
topmost = topmost?.OwnerItem.
GetCurrentParent
() as ToolStripDropDown;
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (2)
449
(originalSelComps.Count == 1 && selItem.
GetCurrentParent
() != nextSelection.
GetCurrentParent
()) ||
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
454
if (item.
GetCurrentParent
() is not ToolStripDropDown parent)
System\Windows\Forms\Design\ToolStripInSituService.cs (2)
97
if (c.
GetCurrentParent
() is ToolStripDropDown dropDown)
118
if (c.
GetCurrentParent
() is MenuStrip tool)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (6)
50
ToolStrip oldSelectionParent = oldSelection.
GetCurrentParent
();
51
ToolStrip newSelectionParent = newSelection.
GetCurrentParent
();
402
parent = glyphItem.
GetCurrentParent
();
614
ToolStripDropDown dropDown = glyphItem.
GetCurrentParent
() as ToolStripDropDown;
657
ToolStrip parentToolStrip = currentDropItem.
GetCurrentParent
();
801
if (item.
GetCurrentParent
() is ToolStripDropDown dropDown && !(dropDown is ToolStripOverflow))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (4)
159
ToolStrip parent = ToolStripItem.
GetCurrentParent
();
507
protected virtual Component GetOwnerForActionList() => (ToolStripItem.Placement == ToolStripItemPlacement.Main) ? ToolStripItem.
GetCurrentParent
() : ToolStripItem.Owner;
584
ToolStrip parent = ToolStripItem.
GetCurrentParent
();
917
if (ToolStripItem.
GetCurrentParent
() is ToolStripDropDown
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (11)
176
ToolStrip owner = curDesignerNode.
GetCurrentParent
();
610
parent = item.
GetCurrentParent
();
682
ToolStrip parent = item.
GetCurrentParent
();
727
ToolStrip parent = item.
GetCurrentParent
();
768
ToolStrip parent = selectedItem.
GetCurrentParent
();
1215
if (toolStripItem is DesignerToolStripControlHost && toolStripItem.
GetCurrentParent
() is ToolStripDropDown parent)
1275
ToolStrip mainTool = owner.
GetCurrentParent
();
1363
parentToMoveOn = item.
GetCurrentParent
() as ToolStripDropDown;
1384
parentToMoveOn = item.
GetCurrentParent
() as ToolStripDropDown;
1858
ToolStrip parent = item.
GetCurrentParent
();
1958
ToolStrip parent = item.
GetCurrentParent
();
System\Windows\Forms\Design\ToolStripMenuItemCodeDomSerializer.cs (1)
39
ToolStrip? parent = item.
GetCurrentParent
();
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (3)
1564
if ((topMostItem is not null && topMostItem.
GetCurrentParent
() is ToolStripOverflow) && !main.CanOverflow)
1652
Rectangle hostingDropDownBounds = (MenuItem.
GetCurrentParent
()).Bounds;
2683
ToolStripDropDown parentToolStrip = primaryItem.
GetCurrentParent
() as ToolStripDropDown;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
437
ToolStrip parent = _controlHost.
GetCurrentParent
();
System.Windows.Forms.Tests (27)
System\Windows\Forms\MenuStripTests.cs (1)
115
Assert.Same(control, control.OverflowButton.
GetCurrentParent
());
System\Windows\Forms\StatusStripTests.cs (1)
114
Assert.Same(control, control.OverflowButton.
GetCurrentParent
());
System\Windows\Forms\ToolStripControlHostTests.cs (15)
1397
Assert.Same(parent, item.
GetCurrentParent
());
1406
Assert.Same(parent, item.
GetCurrentParent
());
1466
Assert.Same(parent, item.
GetCurrentParent
());
1477
Assert.Same(parent, item.
GetCurrentParent
());
1536
Assert.Same(parent, item.
GetCurrentParent
());
3111
Assert.Null(item.
GetCurrentParent
());
3120
Assert.Null(item.
GetCurrentParent
());
3131
Assert.Null(item.
GetCurrentParent
());
3142
Assert.Null(item.
GetCurrentParent
());
3153
Assert.Null(item.
GetCurrentParent
());
3184
Assert.Null(item.
GetCurrentParent
());
3194
Assert.Null(item.
GetCurrentParent
());
3206
Assert.Null(item.
GetCurrentParent
());
3218
Assert.Null(item.
GetCurrentParent
());
3230
Assert.Null(item.
GetCurrentParent
());
System\Windows\Forms\ToolStripDropDownTests.cs (1)
122
Assert.Same(control, control.OverflowButton.
GetCurrentParent
());
System\Windows\Forms\ToolStripItemTests.cs (7)
6975
Assert.Same(parent, item.
GetCurrentParent
());
6983
Assert.Same(parent, item.
GetCurrentParent
());
7032
Assert.Same(parent, item.
GetCurrentParent
());
7040
Assert.Same(parent, item.
GetCurrentParent
());
10271
Assert.Null(item.
GetCurrentParent
());
10282
Assert.Same(parent, item.
GetCurrentParent
());
10293
Assert.Null(item.
GetCurrentParent
());
System\Windows\Forms\ToolStripTests.cs (2)
131
Assert.Same(control, control.OverflowButton.
GetCurrentParent
());
286
Assert.Same(control, control.OverflowButton.
GetCurrentParent
());