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