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)
58private ToolStripDropDownDirection _toolStripDropDownDirection = ToolStripDropDownDirection.Default; 570public virtual ToolStripDropDownDirection DefaultDropDownDirection 574ToolStripDropDownDirection direction = _toolStripDropDownDirection; 575if (direction == ToolStripDropDownDirection.Default) 583direction = (actualDock == DockStyle.Right) ? ToolStripDropDownDirection.Left : ToolStripDropDownDirection.Right; 586direction = ToolStripDropDownDirection.Right; 591direction = ((Dock == DockStyle.Right) && (RightToLeft == RightToLeft.No)) ? ToolStripDropDownDirection.Left : ToolStripDropDownDirection.Right; 594direction = ToolStripDropDownDirection.Right; 608direction = (RightToLeft == RightToLeft.Yes) ? ToolStripDropDownDirection.AboveLeft : ToolStripDropDownDirection.AboveRight; 613direction = (RightToLeft == RightToLeft.Yes) ? ToolStripDropDownDirection.BelowLeft : ToolStripDropDownDirection.BelowRight; 625case ToolStripDropDownDirection.AboveLeft: 626case ToolStripDropDownDirection.AboveRight: 627case ToolStripDropDownDirection.BelowLeft: 628case ToolStripDropDownDirection.BelowRight: 629case ToolStripDropDownDirection.Left: 630case ToolStripDropDownDirection.Right: 631case ToolStripDropDownDirection.Default: 634throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(ToolStripDropDownDirection)); 4455return (_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: 379private Rectangle GetDropDownBounds(ToolStripDropDownDirection dropDownDirection) 395dropDownBounds = DropDownDirectionToDropDownBounds(!rtl ? ToolStripDropDownDirection.Right : ToolStripDropDownDirection.Left, dropDownBounds); 401dropDownBounds = DropDownDirectionToDropDownBounds(!rtl ? ToolStripDropDownDirection.Left : ToolStripDropDownDirection.Right, dropDownBounds); 646private ToolStripDropDownDirection RTLTranslateDropDownDirection(ToolStripDropDownDirection dropDownDirection, RightToLeft rightToLeft) 650case ToolStripDropDownDirection.AboveLeft: 651return ToolStripDropDownDirection.AboveRight; 652case ToolStripDropDownDirection.AboveRight: 653return ToolStripDropDownDirection.AboveLeft; 654case ToolStripDropDownDirection.BelowRight: 655return ToolStripDropDownDirection.BelowLeft; 656case ToolStripDropDownDirection.BelowLeft: 657return ToolStripDropDownDirection.BelowRight; 658case ToolStripDropDownDirection.Right: 659return ToolStripDropDownDirection.Left; 660case ToolStripDropDownDirection.Left: 661return ToolStripDropDownDirection.Right; 669return (rightToLeft == RightToLeft.Yes) ? ToolStripDropDownDirection.Left : ToolStripDropDownDirection.Right; 673return (rightToLeft == RightToLeft.Yes) ? ToolStripDropDownDirection.BelowLeft : ToolStripDropDownDirection.BelowRight; 737=> _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)