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)
789else 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)
787ToolStripDropDown dropDown = (ToolStripDropDown)((DesignerToolStripControlHost)comp).GetCurrentParent(); 847if (designerItem.GetCurrentParent() is ToolStripDropDown parent) 1628topmost = 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(); 626parent = item.GetCurrentParent(); 698ToolStrip parent = item.GetCurrentParent(); 743ToolStrip parent = item.GetCurrentParent(); 784ToolStrip parent = selectedItem.GetCurrentParent(); 1228if (toolStripItem is DesignerToolStripControlHost && toolStripItem.GetCurrentParent() is ToolStripDropDown parent) 1290ToolStrip mainTool = owner.GetCurrentParent(); 1381parentToMoveOn = item.GetCurrentParent() as ToolStripDropDown; 1400parentToMoveOn = item.GetCurrentParent() as ToolStripDropDown; 1875ToolStrip parent = item.GetCurrentParent(); 1975ToolStrip parent = item.GetCurrentParent();
System\Windows\Forms\Design\ToolStripMenuItemCodeDomSerializer.cs (1)
39ToolStrip? parent = item.GetCurrentParent();
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (3)
1580if ((topMostItem is not null && topMostItem.GetCurrentParent() is ToolStripOverflow) && !main.CanOverflow) 1668Rectangle hostingDropDownBounds = (MenuItem.GetCurrentParent()).Bounds; 2699ToolStripDropDown 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)
6976Assert.Same(parent, item.GetCurrentParent()); 6984Assert.Same(parent, item.GetCurrentParent()); 7033Assert.Same(parent, item.GetCurrentParent()); 7041Assert.Same(parent, item.GetCurrentParent()); 10291Assert.Null(item.GetCurrentParent()); 10302Assert.Same(parent, item.GetCurrentParent()); 10313Assert.Null(item.GetCurrentParent());
System\Windows\Forms\ToolStripTests.cs (2)
131Assert.Same(control, control.OverflowButton.GetCurrentParent()); 286Assert.Same(control, control.OverflowButton.GetCurrentParent());