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)
4270ToolStripItemPlacement placement = item.Placement; 4273if (placement == ToolStripItemPlacement.Main) 4298else if (placement == ToolStripItemPlacement.Overflow && !(item is ToolStripSeparator)) 4305item.SetPlacement(ToolStripItemPlacement.None); 4356item.SetPlacement(ToolStripItemPlacement.Main); 4361item.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)
648if (_ownerItem.Placement == ToolStripItemPlacement.Overflow && _ownerItem.Owner is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (7)
35private ToolStripItemPlacement _placement = ToolStripItemPlacement.None; 1239public bool IsOnOverflow => Placement == ToolStripItemPlacement.Overflow; 1545public ToolStripItemPlacement Placement => _placement; 3268internal void SetPlacement(ToolStripItemPlacement placement) => _placement = placement; 3501internal static bool GetIsOffscreenPropertyValue(ToolStripItemPlacement? toolStripItemPlacement, Rectangle bounds) 3503return 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) 665if (designer is not null && item.Placement != ToolStripItemPlacement.Overflow) 674else if (designer is not null && item.Placement == ToolStripItemPlacement.Overflow) 754if (item.Placement == ToolStripItemPlacement.Overflow && item.Owner == ToolStrip) 779if (item.IsOnDropDown && item.Placement != ToolStripItemPlacement.Overflow) 796else if (item.IsOnDropDown && item.Placement != ToolStripItemPlacement.Overflow) 1069if (item.Placement == ToolStripItemPlacement.Overflow) 1304if (item.Placement == ToolStripItemPlacement.Main) 2237if (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)
1970if (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); 6243[InlineData(ToolStripItemOverflow.Never, ToolStripItemPlacement.Main, 1)] 6244[InlineData(ToolStripItemOverflow.Always, ToolStripItemPlacement.Overflow, 1)] 6245[InlineData(ToolStripItemOverflow.AsNeeded, ToolStripItemPlacement.None, 0)] 6246public void ToolStripItem_Overflow_SetWithOwner_GetReturnsExpected(ToolStripItemOverflow value, ToolStripItemPlacement expectedPlacement, int expectedOwnerLayoutCallCount) 6288[InlineData(ToolStripItemOverflow.Never, ToolStripItemPlacement.Main, 1)] 6289[InlineData(ToolStripItemOverflow.Always, ToolStripItemPlacement.Overflow, 1)] 6290[InlineData(ToolStripItemOverflow.AsNeeded, ToolStripItemPlacement.None, 0)] 6291public void ToolStripItem_Overflow_SetWithOwnerWithHandle_GetReturnsExpected(ToolStripItemOverflow value, ToolStripItemPlacement expectedPlacement, int expectedOwnerLayoutCallCount) 6363Assert.Equal(ToolStripItemPlacement.None, item.Placement); 6371Assert.Equal(ToolStripItemPlacement.None, item.Placement); 6406Assert.Equal(ToolStripItemPlacement.None, item.Placement); 6417Assert.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);