103 references to ToolStripItemPlacement
System.Windows.Forms (48)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (3)
393
item.SetPlacement(
ToolStripItemPlacement
.None);
400
item.SetPlacement(
ToolStripItemPlacement
.None);
410
item.SetPlacement(
ToolStripItemPlacement
.None);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (6)
4270
ToolStripItemPlacement
placement = item.Placement;
4273
if (placement ==
ToolStripItemPlacement
.Main)
4298
else if (placement ==
ToolStripItemPlacement
.Overflow && !(item is ToolStripSeparator))
4305
item.SetPlacement(
ToolStripItemPlacement
.None);
4356
item.SetPlacement(
ToolStripItemPlacement
.Main);
4361
item.SetPlacement(
ToolStripItemPlacement
.None);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (3)
101
if (item.Placement ==
ToolStripItemPlacement
.Overflow)
292
ToolStripItemPlacement
placement = child.Owner.Placement;
307
items = placement ==
ToolStripItemPlacement
.Main || child.Owner is ToolStripScrollButton
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
648
if (_ownerItem.Placement ==
ToolStripItemPlacement
.Overflow && _ownerItem.Owner is not null)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (7)
35
private
ToolStripItemPlacement
_placement =
ToolStripItemPlacement
.None;
1239
public bool IsOnOverflow => Placement ==
ToolStripItemPlacement
.Overflow;
1545
public
ToolStripItemPlacement
Placement => _placement;
3268
internal void SetPlacement(
ToolStripItemPlacement
placement) => _placement = placement;
3501
internal static bool GetIsOffscreenPropertyValue(
ToolStripItemPlacement
? toolStripItemPlacement, Rectangle bounds)
3503
return toolStripItemPlacement !=
ToolStripItemPlacement
.Main || bounds.Height <= 0 || bounds.Width <= 0;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (28)
83
if (item.Overflow != ToolStripItemOverflow.Always && item.Placement ==
ToolStripItemPlacement
.None)
133
if (item.Overflow != ToolStripItemOverflow.Always && item.Placement ==
ToolStripItemPlacement
.None)
250
item.SetPlacement(
ToolStripItemPlacement
.Main);
255
item.SetPlacement(
ToolStripItemPlacement
.None);
276
if (!needOverflow && (item.Overflow == ToolStripItemOverflow.AsNeeded && item.Placement ==
ToolStripItemPlacement
.Overflow))
278
item.SetPlacement(
ToolStripItemPlacement
.Main);
285
if (item.Placement ==
ToolStripItemPlacement
.Main)
323
item.SetPlacement(
ToolStripItemPlacement
.None);
328
item.SetPlacement(
ToolStripItemPlacement
.None);
347
item.ParentInternal = (item.Placement ==
ToolStripItemPlacement
.Overflow) ? toolStrip.OverflowButton.DropDown : null;
392
item.SetPlacement(
ToolStripItemPlacement
.Main);
396
item.SetPlacement(
ToolStripItemPlacement
.None);
418
if (!needOverflow && (item.Overflow == ToolStripItemOverflow.AsNeeded && item.Placement ==
ToolStripItemPlacement
.Overflow))
420
item.SetPlacement(
ToolStripItemPlacement
.Main);
427
if (item.Placement ==
ToolStripItemPlacement
.Main)
456
item.SetPlacement(
ToolStripItemPlacement
.None);
461
item.SetPlacement(
ToolStripItemPlacement
.None);
480
item.ParentInternal = (item.Placement ==
ToolStripItemPlacement
.Overflow) ? toolStrip.OverflowButton.DropDown : null;
490
if ((item.Placement ==
ToolStripItemPlacement
.Main) && !(item is ToolStripOverflowButton))
504
item.SetPlacement(
ToolStripItemPlacement
.None);
512
item.SetPlacement(
ToolStripItemPlacement
.None);
527
if (item.Placement ==
ToolStripItemPlacement
.None)
533
item.SetPlacement(
ToolStripItemPlacement
.Main);
537
item.SetPlacement(
ToolStripItemPlacement
.Overflow);
549
if (toolStrip.Items[i].Placement ==
ToolStripItemPlacement
.Overflow)
554
toolStrip.Items[i].SetPlacement(
ToolStripItemPlacement
.None);
581
if (item.Overflow == ToolStripItemOverflow.AsNeeded && item.Placement !=
ToolStripItemPlacement
.Overflow)
595
item.SetPlacement(
ToolStripItemPlacement
.Overflow);
System.Windows.Forms.Design (20)
System\Windows\Forms\Design\ToolStripDesigner.cs (9)
474
if (item.Placement ==
ToolStripItemPlacement
.Overflow)
665
if (designer is not null && item.Placement !=
ToolStripItemPlacement
.Overflow)
674
else if (designer is not null && item.Placement ==
ToolStripItemPlacement
.Overflow)
754
if (item.Placement ==
ToolStripItemPlacement
.Overflow && item.Owner == ToolStrip)
779
if (item.IsOnDropDown && item.Placement !=
ToolStripItemPlacement
.Overflow)
796
else if (item.IsOnDropDown && item.Placement !=
ToolStripItemPlacement
.Overflow)
1069
if (item.Placement ==
ToolStripItemPlacement
.Overflow)
1304
if (item.Placement ==
ToolStripItemPlacement
.Main)
2237
if (item.Placement ==
ToolStripItemPlacement
.Overflow)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (4)
549
if (glyphItem.Placement ==
ToolStripItemPlacement
.Overflow || (glyphItem.Placement ==
ToolStripItemPlacement
.Main && !(glyphItem.IsOnDropDown)))
979
if (glyphItem.Placement ==
ToolStripItemPlacement
.Overflow || (glyphItem.Placement ==
ToolStripItemPlacement
.Main && !(glyphItem.IsOnDropDown)))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (2)
507
protected virtual Component GetOwnerForActionList() => (ToolStripItem.Placement ==
ToolStripItemPlacement
.Main) ? ToolStripItem.GetCurrentParent() : ToolStripItem.Owner;
1245
if (ToolStripItem.Placement !=
ToolStripItemPlacement
.None)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (4)
1394
parentToMoveOn = ((dropDownItem.Placement ==
ToolStripItemPlacement
.Overflow) ? dropDownItem.Owner.OverflowButton.DropDown : dropDownItem.Owner) as ToolStripDropDown;
1739
if (toolStripItem.IsOnDropDown && toolStripItem.Placement !=
ToolStripItemPlacement
.Overflow)
1743
else if (toolStripItem.IsOnDropDown && toolStripItem.Placement ==
ToolStripItemPlacement
.Overflow)
1861
if (item is not null && item.IsOnDropDown && item.Placement !=
ToolStripItemPlacement
.Overflow)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1970
if (e.Component is ToolStripItem itemToBeDeleted && itemToBeDeleted.IsOnDropDown && itemToBeDeleted.Placement ==
ToolStripItemPlacement
.Main)
System.Windows.Forms.Tests (35)
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (3)
1510
host.SetPlacement(
ToolStripItemPlacement
.Main);
1548
host.SetPlacement(
ToolStripItemPlacement
.Main);
1584
host.SetPlacement(
ToolStripItemPlacement
.Main);
System\Windows\Forms\ToolStrip.ToolStripAccessibleObjectWrapperForItemsOnOverflowTests.cs (3)
30
toolStripItem.SetPlacement(
ToolStripItemPlacement
.Overflow);
46
toolStripItem.SetPlacement(
ToolStripItemPlacement
.Overflow);
78
toolStripItem.SetPlacement(
ToolStripItemPlacement
.Overflow);
System\Windows\Forms\ToolStripButtonTests.cs (6)
76
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
157
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
244
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
334
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
422
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
520
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
System\Windows\Forms\ToolStripControlHostTests.cs (1)
105
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
76
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
165
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
264
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
372
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
System\Windows\Forms\ToolStripItemTests.cs (15)
75
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
160
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
255
Assert.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)]
6246
public 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)]
6291
public void ToolStripItem_Overflow_SetWithOwnerWithHandle_GetReturnsExpected(ToolStripItemOverflow value,
ToolStripItemPlacement
expectedPlacement, int expectedOwnerLayoutCallCount)
6363
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
6371
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
6406
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
6417
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
83
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
73
Assert.Equal(
ToolStripItemPlacement
.None, item.Placement);
System\Windows\Forms\ToolStripTests.cs (1)
5827
item.SetPlacement(
ToolStripItemPlacement
.Main);