116 references to ToolStripDropDownDirection
System.Windows.Forms (100)
System\Windows\Forms\ContextMenuStrip.cs (3)
97
Rectangle bounds = CalculateDropDownLocation(new Point(x, y),
ToolStripDropDownDirection
.AboveLeft);
101
bounds = CalculateDropDownLocation(new Point(x, y),
ToolStripDropDownDirection
.BelowLeft);
105
bounds = CalculateDropDownLocation(new Point(x, y),
ToolStripDropDownDirection
.AboveRight);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (24)
53
private
ToolStripDropDownDirection
_toolStripDropDownDirection =
ToolStripDropDownDirection
.Default;
565
public virtual
ToolStripDropDownDirection
DefaultDropDownDirection
569
ToolStripDropDownDirection
direction = _toolStripDropDownDirection;
570
if (direction ==
ToolStripDropDownDirection
.Default)
578
direction = (actualDock == DockStyle.Right) ?
ToolStripDropDownDirection
.Left :
ToolStripDropDownDirection
.Right;
581
direction =
ToolStripDropDownDirection
.Right;
586
direction = ((Dock == DockStyle.Right) && (RightToLeft == RightToLeft.No)) ?
ToolStripDropDownDirection
.Left :
ToolStripDropDownDirection
.Right;
589
direction =
ToolStripDropDownDirection
.Right;
603
direction = (RightToLeft == RightToLeft.Yes) ?
ToolStripDropDownDirection
.AboveLeft :
ToolStripDropDownDirection
.AboveRight;
608
direction = (RightToLeft == RightToLeft.Yes) ?
ToolStripDropDownDirection
.BelowLeft :
ToolStripDropDownDirection
.BelowRight;
620
case
ToolStripDropDownDirection
.AboveLeft:
621
case
ToolStripDropDownDirection
.AboveRight:
622
case
ToolStripDropDownDirection
.BelowLeft:
623
case
ToolStripDropDownDirection
.BelowRight:
624
case
ToolStripDropDownDirection
.Left:
625
case
ToolStripDropDownDirection
.Right:
626
case
ToolStripDropDownDirection
.Default:
629
throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(
ToolStripDropDownDirection
));
4450
return (_toolStripDropDownDirection !=
ToolStripDropDownDirection
.Default);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (16)
24
private
ToolStripDropDownDirection
_childDropDownDirection =
ToolStripDropDownDirection
.Default;
273
public override
ToolStripDropDownDirection
DefaultDropDownDirection
275
get => _childDropDownDirection ==
ToolStripDropDownDirection
.Default
276
? (RightToLeft == RightToLeft.Yes) ?
ToolStripDropDownDirection
.Left :
ToolStripDropDownDirection
.Right
1009
internal Rectangle CalculateDropDownLocation(Point start,
ToolStripDropDownDirection
dropDownDirection)
1024
case
ToolStripDropDownDirection
.AboveLeft:
1028
case
ToolStripDropDownDirection
.AboveRight:
1031
case
ToolStripDropDownDirection
.BelowRight:
1032
case
ToolStripDropDownDirection
.Right:
1034
case
ToolStripDropDownDirection
.BelowLeft:
1035
case
ToolStripDropDownDirection
.Left:
1787
return (_childDropDownDirection !=
ToolStripDropDownDirection
.Default);
1829
public void Show(Control control, Point position,
ToolStripDropDownDirection
direction)
1852
public void Show(Point position,
ToolStripDropDownDirection
direction)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (46)
20
private
ToolStripDropDownDirection
_toolStripDropDownDirection =
ToolStripDropDownDirection
.Default;
121
public
ToolStripDropDownDirection
DropDownDirection
125
if (_toolStripDropDownDirection ==
ToolStripDropDownDirection
.Default)
130
ToolStripDropDownDirection
dropDownDirection = parent.DefaultDropDownDirection;
148
ToolStripDropDownDirection
newDropDownDirection = RTLTranslateDropDownDirection(dropDownDirection, toggledRightToLeft);
171
case
ToolStripDropDownDirection
.AboveLeft:
172
case
ToolStripDropDownDirection
.AboveRight:
173
case
ToolStripDropDownDirection
.BelowLeft:
174
case
ToolStripDropDownDirection
.BelowRight:
175
case
ToolStripDropDownDirection
.Left:
176
case
ToolStripDropDownDirection
.Right:
177
case
ToolStripDropDownDirection
.Default:
180
throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(
ToolStripDropDownDirection
));
214
ToolStripDropDownDirection
dropDownDirection = DropDownDirection;
300
private Rectangle DropDownDirectionToDropDownBounds(
ToolStripDropDownDirection
dropDownDirection, Rectangle dropDownBounds)
306
case
ToolStripDropDownDirection
.AboveLeft:
310
case
ToolStripDropDownDirection
.AboveRight:
313
case
ToolStripDropDownDirection
.BelowRight:
316
case
ToolStripDropDownDirection
.BelowLeft:
320
case
ToolStripDropDownDirection
.Right:
330
case
ToolStripDropDownDirection
.Left:
377
private Rectangle GetDropDownBounds(
ToolStripDropDownDirection
dropDownDirection)
393
dropDownBounds = DropDownDirectionToDropDownBounds(!rtl ?
ToolStripDropDownDirection
.Right :
ToolStripDropDownDirection
.Left, dropDownBounds);
399
dropDownBounds = DropDownDirectionToDropDownBounds(!rtl ?
ToolStripDropDownDirection
.Left :
ToolStripDropDownDirection
.Right, dropDownBounds);
644
private
ToolStripDropDownDirection
RTLTranslateDropDownDirection(
ToolStripDropDownDirection
dropDownDirection, RightToLeft rightToLeft)
648
case
ToolStripDropDownDirection
.AboveLeft:
649
return
ToolStripDropDownDirection
.AboveRight;
650
case
ToolStripDropDownDirection
.AboveRight:
651
return
ToolStripDropDownDirection
.AboveLeft;
652
case
ToolStripDropDownDirection
.BelowRight:
653
return
ToolStripDropDownDirection
.BelowLeft;
654
case
ToolStripDropDownDirection
.BelowLeft:
655
return
ToolStripDropDownDirection
.BelowRight;
656
case
ToolStripDropDownDirection
.Right:
657
return
ToolStripDropDownDirection
.Left;
658
case
ToolStripDropDownDirection
.Left:
659
return
ToolStripDropDownDirection
.Right;
667
return (rightToLeft == RightToLeft.Yes) ?
ToolStripDropDownDirection
.Left :
ToolStripDropDownDirection
.Right;
671
return (rightToLeft == RightToLeft.Yes) ?
ToolStripDropDownDirection
.BelowLeft :
ToolStripDropDownDirection
.BelowRight;
735
=> _toolStripDropDownDirection !=
ToolStripDropDownDirection
.Default;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (6)
117
case
ToolStripDropDownDirection
.AboveLeft:
118
case
ToolStripDropDownDirection
.AboveRight:
120
case
ToolStripDropDownDirection
.BelowRight:
121
case
ToolStripDropDownDirection
.BelowLeft:
131
case
ToolStripDropDownDirection
.Right:
132
case
ToolStripDropDownDirection
.Left:
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (5)
451
ToolStripDropDownDirection
direction = item.DropDownDirection;
453
if (direction is
ToolStripDropDownDirection
.AboveLeft or
ToolStripDropDownDirection
.AboveRight)
457
else if (direction ==
ToolStripDropDownDirection
.Left)
461
else if (direction ==
ToolStripDropDownDirection
.Right)
System.Windows.Forms.Design (16)
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (2)
379
if (ownerItem.DropDownDirection is
ToolStripDropDownDirection
.AboveLeft or
ToolStripDropDownDirection
.AboveRight)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (14)
584
ToolStripItem nextItem = (MenuItem.DropDownDirection ==
ToolStripDropDownDirection
.AboveLeft ||
585
MenuItem.DropDownDirection ==
ToolStripDropDownDirection
.AboveRight) && index >= 1
760
if (MenuItem.DropDownDirection is
ToolStripDropDownDirection
.AboveLeft or
ToolStripDropDownDirection
.AboveRight)
832
if (MenuItem.DropDownDirection is
ToolStripDropDownDirection
.AboveLeft or
ToolStripDropDownDirection
.AboveRight)
1680
if (MenuItem.DropDownDirection is
ToolStripDropDownDirection
.AboveLeft or
ToolStripDropDownDirection
.AboveRight)
1708
if (MenuItem.DropDownDirection is not
ToolStripDropDownDirection
.AboveLeft and not
ToolStripDropDownDirection
.AboveRight)
1987
if (MenuItem.DropDownDirection is not
ToolStripDropDownDirection
.AboveLeft and not
ToolStripDropDownDirection
.AboveRight)
2392
if (MenuItem.DropDownDirection is not
ToolStripDropDownDirection
.AboveLeft and not
ToolStripDropDownDirection
.AboveRight)