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)
678ToolStrip? 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)
745ToolStripDropDown dropDown = (ToolStripDropDown)((DesignerToolStripControlHost)comp).GetCurrentParent(); 804if (designerItem.GetCurrentParent() is ToolStripDropDown parent) 1665topmost = 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(); 611ToolStripDropDown dropDown = glyphItem.GetCurrentParent() as ToolStripDropDown; 654ToolStrip parentToolStrip = currentDropItem.GetCurrentParent(); 792if (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(); 1206if (toolStripItem is DesignerToolStripControlHost && toolStripItem.GetCurrentParent() is ToolStripDropDown parent) 1266ToolStrip mainTool = owner.GetCurrentParent(); 1354parentToMoveOn = item.GetCurrentParent() as ToolStripDropDown; 1375parentToMoveOn = item.GetCurrentParent() as ToolStripDropDown; 1849ToolStrip parent = item.GetCurrentParent(); 1949ToolStrip 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; 2680ToolStripDropDown parentToolStrip = primaryItem.GetCurrentParent() as ToolStripDropDown;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
416ToolStrip parent = _controlHost.GetCurrentParent();
System.Windows.Forms.Tests (27)
System\Windows\Forms\MenuStripTests.cs (1)
117Assert.Same(control, control.OverflowButton.GetCurrentParent());
System\Windows\Forms\StatusStripTests.cs (1)
116Assert.Same(control, control.OverflowButton.GetCurrentParent());
System\Windows\Forms\ToolStripControlHostTests.cs (15)
1399Assert.Same(parent, item.GetCurrentParent()); 1408Assert.Same(parent, item.GetCurrentParent()); 1468Assert.Same(parent, item.GetCurrentParent()); 1479Assert.Same(parent, item.GetCurrentParent()); 1538Assert.Same(parent, item.GetCurrentParent()); 3113Assert.Null(item.GetCurrentParent()); 3122Assert.Null(item.GetCurrentParent()); 3133Assert.Null(item.GetCurrentParent()); 3144Assert.Null(item.GetCurrentParent()); 3155Assert.Null(item.GetCurrentParent()); 3186Assert.Null(item.GetCurrentParent()); 3196Assert.Null(item.GetCurrentParent()); 3208Assert.Null(item.GetCurrentParent()); 3220Assert.Null(item.GetCurrentParent()); 3232Assert.Null(item.GetCurrentParent());
System\Windows\Forms\ToolStripDropDownTests.cs (1)
124Assert.Same(control, control.OverflowButton.GetCurrentParent());
System\Windows\Forms\ToolStripItemTests.cs (7)
6977Assert.Same(parent, item.GetCurrentParent()); 6985Assert.Same(parent, item.GetCurrentParent()); 7034Assert.Same(parent, item.GetCurrentParent()); 7042Assert.Same(parent, item.GetCurrentParent()); 10273Assert.Null(item.GetCurrentParent()); 10284Assert.Same(parent, item.GetCurrentParent()); 10295Assert.Null(item.GetCurrentParent());
System\Windows\Forms\ToolStripTests.cs (2)
133Assert.Same(control, control.OverflowButton.GetCurrentParent()); 288Assert.Same(control, control.OverflowButton.GetCurrentParent());