103 references to ToolStripItemPlacement
System.Windows.Forms (48)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (3)
393item.SetPlacement(ToolStripItemPlacement.None); 400item.SetPlacement(ToolStripItemPlacement.None); 410item.SetPlacement(ToolStripItemPlacement.None);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (6)
4382ToolStripItemPlacement placement = item.Placement; 4385if (placement == ToolStripItemPlacement.Main) 4410else if (placement == ToolStripItemPlacement.Overflow && !(item is ToolStripSeparator)) 4417item.SetPlacement(ToolStripItemPlacement.None); 4468item.SetPlacement(ToolStripItemPlacement.Main); 4473item.SetPlacement(ToolStripItemPlacement.None);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (3)
101if (item.Placement == ToolStripItemPlacement.Overflow) 292ToolStripItemPlacement placement = child.Owner.Placement; 307items = placement == ToolStripItemPlacement.Main || child.Owner is ToolStripScrollButton
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
726if (_ownerItem.Placement == ToolStripItemPlacement.Overflow && _ownerItem.Owner is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (7)
35private ToolStripItemPlacement _placement = ToolStripItemPlacement.None; 1247public bool IsOnOverflow => Placement == ToolStripItemPlacement.Overflow; 1553public ToolStripItemPlacement Placement => _placement; 3302internal void SetPlacement(ToolStripItemPlacement placement) => _placement = placement; 3544internal static bool GetIsOffscreenPropertyValue(ToolStripItemPlacement? toolStripItemPlacement, Rectangle bounds) 3546return toolStripItemPlacement != ToolStripItemPlacement.Main || bounds.Height <= 0 || bounds.Width <= 0;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (28)
83if (item.Overflow != ToolStripItemOverflow.Always && item.Placement == ToolStripItemPlacement.None) 133if (item.Overflow != ToolStripItemOverflow.Always && item.Placement == ToolStripItemPlacement.None) 250item.SetPlacement(ToolStripItemPlacement.Main); 255item.SetPlacement(ToolStripItemPlacement.None); 276if (!needOverflow && (item.Overflow == ToolStripItemOverflow.AsNeeded && item.Placement == ToolStripItemPlacement.Overflow)) 278item.SetPlacement(ToolStripItemPlacement.Main); 285if (item.Placement == ToolStripItemPlacement.Main) 323item.SetPlacement(ToolStripItemPlacement.None); 328item.SetPlacement(ToolStripItemPlacement.None); 347item.ParentInternal = (item.Placement == ToolStripItemPlacement.Overflow) ? toolStrip.OverflowButton.DropDown : null; 392item.SetPlacement(ToolStripItemPlacement.Main); 396item.SetPlacement(ToolStripItemPlacement.None); 418if (!needOverflow && (item.Overflow == ToolStripItemOverflow.AsNeeded && item.Placement == ToolStripItemPlacement.Overflow)) 420item.SetPlacement(ToolStripItemPlacement.Main); 427if (item.Placement == ToolStripItemPlacement.Main) 456item.SetPlacement(ToolStripItemPlacement.None); 461item.SetPlacement(ToolStripItemPlacement.None); 480item.ParentInternal = (item.Placement == ToolStripItemPlacement.Overflow) ? toolStrip.OverflowButton.DropDown : null; 490if ((item.Placement == ToolStripItemPlacement.Main) && !(item is ToolStripOverflowButton)) 504item.SetPlacement(ToolStripItemPlacement.None); 512item.SetPlacement(ToolStripItemPlacement.None); 527if (item.Placement == ToolStripItemPlacement.None) 533item.SetPlacement(ToolStripItemPlacement.Main); 537item.SetPlacement(ToolStripItemPlacement.Overflow); 549if (toolStrip.Items[i].Placement == ToolStripItemPlacement.Overflow) 554toolStrip.Items[i].SetPlacement(ToolStripItemPlacement.None); 581if (item.Overflow == ToolStripItemOverflow.AsNeeded && item.Placement != ToolStripItemPlacement.Overflow) 595item.SetPlacement(ToolStripItemPlacement.Overflow);
System.Windows.Forms.Design (20)
System\Windows\Forms\Design\ToolStripDesigner.cs (9)
474if (item.Placement == ToolStripItemPlacement.Overflow) 671if (designer is not null && item.Placement != ToolStripItemPlacement.Overflow) 680else if (designer is not null && item.Placement == ToolStripItemPlacement.Overflow) 760if (item.Placement == ToolStripItemPlacement.Overflow && item.Owner == ToolStrip) 785if (item.IsOnDropDown && item.Placement != ToolStripItemPlacement.Overflow) 802else if (item.IsOnDropDown && item.Placement != ToolStripItemPlacement.Overflow) 1075if (item.Placement == ToolStripItemPlacement.Overflow) 1310if (item.Placement == ToolStripItemPlacement.Main) 2255if (item.Placement == ToolStripItemPlacement.Overflow)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (4)
549if (glyphItem.Placement == ToolStripItemPlacement.Overflow || (glyphItem.Placement == ToolStripItemPlacement.Main && !(glyphItem.IsOnDropDown))) 979if (glyphItem.Placement == ToolStripItemPlacement.Overflow || (glyphItem.Placement == ToolStripItemPlacement.Main && !(glyphItem.IsOnDropDown)))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (2)
507protected virtual Component GetOwnerForActionList() => (ToolStripItem.Placement == ToolStripItemPlacement.Main) ? ToolStripItem.GetCurrentParent() : ToolStripItem.Owner; 1245if (ToolStripItem.Placement != ToolStripItemPlacement.None)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (4)
1394parentToMoveOn = ((dropDownItem.Placement == ToolStripItemPlacement.Overflow) ? dropDownItem.Owner.OverflowButton.DropDown : dropDownItem.Owner) as ToolStripDropDown; 1739if (toolStripItem.IsOnDropDown && toolStripItem.Placement != ToolStripItemPlacement.Overflow) 1743else if (toolStripItem.IsOnDropDown && toolStripItem.Placement == ToolStripItemPlacement.Overflow) 1861if (item is not null && item.IsOnDropDown && item.Placement != ToolStripItemPlacement.Overflow)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1976if (e.Component is ToolStripItem itemToBeDeleted && itemToBeDeleted.IsOnDropDown && itemToBeDeleted.Placement == ToolStripItemPlacement.Main)
System.Windows.Forms.Tests (35)
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (3)
1510host.SetPlacement(ToolStripItemPlacement.Main); 1548host.SetPlacement(ToolStripItemPlacement.Main); 1584host.SetPlacement(ToolStripItemPlacement.Main);
System\Windows\Forms\ToolStrip.ToolStripAccessibleObjectWrapperForItemsOnOverflowTests.cs (3)
30toolStripItem.SetPlacement(ToolStripItemPlacement.Overflow); 46toolStripItem.SetPlacement(ToolStripItemPlacement.Overflow); 78toolStripItem.SetPlacement(ToolStripItemPlacement.Overflow);
System\Windows\Forms\ToolStripButtonTests.cs (6)
76Assert.Equal(ToolStripItemPlacement.None, item.Placement); 157Assert.Equal(ToolStripItemPlacement.None, item.Placement); 244Assert.Equal(ToolStripItemPlacement.None, item.Placement); 334Assert.Equal(ToolStripItemPlacement.None, item.Placement); 422Assert.Equal(ToolStripItemPlacement.None, item.Placement); 520Assert.Equal(ToolStripItemPlacement.None, item.Placement);
System\Windows\Forms\ToolStripControlHostTests.cs (1)
105Assert.Equal(ToolStripItemPlacement.None, item.Placement);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
76Assert.Equal(ToolStripItemPlacement.None, item.Placement); 165Assert.Equal(ToolStripItemPlacement.None, item.Placement); 264Assert.Equal(ToolStripItemPlacement.None, item.Placement); 372Assert.Equal(ToolStripItemPlacement.None, item.Placement);
System\Windows\Forms\ToolStripItemTests.cs (15)
75Assert.Equal(ToolStripItemPlacement.None, item.Placement); 160Assert.Equal(ToolStripItemPlacement.None, item.Placement); 255Assert.Equal(ToolStripItemPlacement.None, item.Placement); 6244[InlineData(ToolStripItemOverflow.Never, ToolStripItemPlacement.Main, 1)] 6245[InlineData(ToolStripItemOverflow.Always, ToolStripItemPlacement.Overflow, 1)] 6246[InlineData(ToolStripItemOverflow.AsNeeded, ToolStripItemPlacement.None, 0)] 6247public void ToolStripItem_Overflow_SetWithOwner_GetReturnsExpected(ToolStripItemOverflow value, ToolStripItemPlacement expectedPlacement, int expectedOwnerLayoutCallCount) 6289[InlineData(ToolStripItemOverflow.Never, ToolStripItemPlacement.Main, 1)] 6290[InlineData(ToolStripItemOverflow.Always, ToolStripItemPlacement.Overflow, 1)] 6291[InlineData(ToolStripItemOverflow.AsNeeded, ToolStripItemPlacement.None, 0)] 6292public void ToolStripItem_Overflow_SetWithOwnerWithHandle_GetReturnsExpected(ToolStripItemOverflow value, ToolStripItemPlacement expectedPlacement, int expectedOwnerLayoutCallCount) 6364Assert.Equal(ToolStripItemPlacement.None, item.Placement); 6372Assert.Equal(ToolStripItemPlacement.None, item.Placement); 6407Assert.Equal(ToolStripItemPlacement.None, item.Placement); 6418Assert.Equal(ToolStripItemPlacement.None, item.Placement);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
83Assert.Equal(ToolStripItemPlacement.None, item.Placement);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
73Assert.Equal(ToolStripItemPlacement.None, item.Placement);
System\Windows\Forms\ToolStripTests.cs (1)
5827item.SetPlacement(ToolStripItemPlacement.Main);