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