112 references to ArrowDirection
System.Windows.Forms (47)
System\Windows\Forms\Controls\Menus\MenuStrip.cs (1)
154internal override ToolStripItem? GetNextItem(ToolStripItem? start, ArrowDirection direction, bool rtlAware)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (15)
2108internal virtual ToolStripItem? GetNextItem(ToolStripItem? start, ArrowDirection direction, bool rtlAware) 2112if (direction == ArrowDirection.Right) 2114direction = ArrowDirection.Left; 2116else if (direction == ArrowDirection.Left) 2118direction = ArrowDirection.Right; 2131public virtual ToolStripItem? GetNextItem(ToolStripItem? start, ArrowDirection direction) 2135case ArrowDirection.Right: 2137case ArrowDirection.Left: 2140case ArrowDirection.Down: 2142case ArrowDirection.Up: 2145throw new InvalidEnumArgumentException(nameof(direction), (int)direction, typeof(ArrowDirection)); 3170ToolStripItem? nextItem = GetNextItem(currentSel, ArrowDirection.Down); 3179ToolStripItem? nextItem = GetNextItem(currentSel, ArrowDirection.Up); 4263ToolStripItem? nextItem = GetNextItem(start, forward ? ArrowDirection.Right : ArrowDirection.Left, rtlAware: true);
System\Windows\Forms\Controls\ToolStrips\ToolStripArrowRenderEventArgs.cs (2)
18ArrowDirection arrowDirection) 41public ArrowDirection Direction { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
210renderer.DrawArrow(new ToolStripArrowRenderEventArgs(g, this, dropDownArrowRect, arrowColor, ArrowDirection.Down));
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
524internal override ToolStripItem? GetNextItem(ToolStripItem? start, ArrowDirection direction, bool rtlAware)
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (2)
155DrawArrow(new ToolStripArrowRenderEventArgs(g, item, dropDownRect, arrowColor, ArrowDirection.Down)); 208DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new Rectangle(Point.Empty, item.Size), arrowColor, ArrowDirection.Down));
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (8)
244nextItem = parent.GetNextItem(null, ArrowDirection.Right, /*RTLAware=*/true); 247nextItem = parent.GetNextItem(null, ArrowDirection.Left, /*RTLAware=*/true); 251nextItem = parent.GetNextItem(Owner, ArrowDirection.Left, /*RTLAware=*/true); 255nextItem = parent.GetNextItem(Owner, ArrowDirection.Right, /*RTLAware=*/true); 258nextItem = (Owner.IsOnDropDown) ? parent.GetNextItem(Owner, ArrowDirection.Up) : 259parent.GetNextItem(Owner, ArrowDirection.Left, /*RTLAware=*/true); 262nextItem = (Owner.IsOnDropDown) ? parent.GetNextItem(Owner, ArrowDirection.Down) : 263parent.GetNextItem(Owner, ArrowDirection.Right, /*RTLAware=*/true);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (3)
1014ArrowDirection arrowDir = (rightToLeft) ? ArrowDirection.Left : ArrowDirection.Right;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (8)
175ArrowDirection direction = horizontal ? ArrowDirection.Down : ArrowDirection.Right; 307DrawArrow(new ToolStripArrowRenderEventArgs(g, item, dropDownRect, SystemColors.ControlText, ArrowDirection.Down)); 1646private static Point RenderArrowInternal(Graphics g, Rectangle dropDownRect, ArrowDirection direction, Brush brush) 1655ArrowDirection.Up => 1661ArrowDirection.Left => 1667ArrowDirection.Right =>
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (3)
640ArrowDirection.Up => 646ArrowDirection.Left => 652ArrowDirection.Right =>
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (3)
394DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new Rectangle(Point.Empty, item.Size), arrowColor, ArrowDirection.Down)); 577DrawArrow(new ToolStripArrowRenderEventArgs(g, splitButton, splitButton.DropDownButtonBounds, arrowColor, ArrowDirection.Down)); 630DrawArrow(new ToolStripArrowRenderEventArgs(g, splitButton, dropDownRect, arrowColor, ArrowDirection.Down));
System.Windows.Forms.Design (27)
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
2024ToolStripItem nextItem = ToolStrip.GetNextItem(ToolStrip.OverflowButton, ArrowDirection.Left); 2054ToolStripItem nextItem = ddi.DropDown.GetNextItem(null, ArrowDirection.Down);
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (23)
299private static ToolStripItem GetNextItem(ToolStrip parent, ToolStripItem startItem, ArrowDirection direction) 301if (parent.RightToLeft == RightToLeft.Yes && (direction == ArrowDirection.Left || direction == ArrowDirection.Right)) 303if (direction == ArrowDirection.Right) 305direction = ArrowDirection.Left; 307else if (direction == ArrowDirection.Left) 309direction = ArrowDirection.Right; 1239? GetNextItem(parent, toolStripItem, ArrowDirection.Left) 1267targetSelection = GetNextItem(dropDownItem.DropDown, null, ArrowDirection.Right); 1291targetSelection = GetNextItem(mainTool, owner, ArrowDirection.Left); 1337targetSelection = GetNextItem(contextMenu, null, ArrowDirection.Down); 1408targetSelection = GetNextItem(parentToMoveOn, item, ArrowDirection.Down); 1436ToolStripItem firstItem = GetNextItem(parentToMoveOn, null, ArrowDirection.Down); 1441targetSelection = GetNextItem(owner, parentToMoveOn.OwnerItem, ArrowDirection.Left); 1446targetSelection = GetNextItem(parentToMoveOn, item, ArrowDirection.Up); 1451targetSelection = GetNextItem(parentToMoveOn, item, ArrowDirection.Up); 1883ToolStripItem firstItem = GetNextItem(parent, null, ArrowDirection.Down); 1888targetSelection = GetNextItem(owner, ((ToolStripDropDown)parent).OwnerItem, ArrowDirection.Left); 1893targetSelection = GetNextItem(parent, item, ArrowDirection.Left); 1934targetSelection = GetNextItem(parent, item, ArrowDirection.Left); 1946targetSelection = GetNextItem(parent, item, ArrowDirection.Down); 1962targetSelection = GetNextItem(parent, item, ArrowDirection.Right); 2090object newSelection = GetNextItem(overFlowButton.DropDown, null, ArrowDirection.Down);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1815DrawArrow(new ToolStripArrowRenderEventArgs(g, null, bounds, SystemInformation.HighContrast ? Color.Black : SystemColors.ControlText, ArrowDirection.Down)); 2037DrawArrow(new ToolStripArrowRenderEventArgs(g, splitButton, splitButton.DropDownButtonBounds, SystemColors.ControlText, ArrowDirection.Down));
System.Windows.Forms.Tests (38)
System\Windows\Forms\ToolStripArrowRenderEventArgsTests.cs (11)
14Assert.Throws<ArgumentNullException>(() => new ToolStripArrowRenderEventArgs(null, toolStripButton, Rectangle.Empty, Color.Empty, ArrowDirection.Up)); 21yield return new object[] { graphics, null, Rectangle.Empty, Color.Empty, ArrowDirection.Down + 1 }; 22yield return new object[] { graphics, new ToolStripButton(), new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down }; 23yield return new object[] { graphics, new ToolStripButton(), new Rectangle(-1, -2, -3, -4), Color.Blue, ArrowDirection.Down }; 28public void Ctor_Graphics_ToolStripItem_Rectangle_Color_ArrowDirection(Graphics g, ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection) 52ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down) 72ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down) 80[InlineData((ArrowDirection.Down + 1))] 81[InlineData(ArrowDirection.Up)] 82public void Direction_Set_GetReturnsExpected(ArrowDirection value) 87ToolStripArrowRenderEventArgs e = new(graphics, button, new Rectangle(1, 2, 3, 4), Color.Blue, ArrowDirection.Down)
System\Windows\Forms\ToolStripDropDownTests.cs (5)
4897ToolStripItem actual = toolStrip.DropDown.GetNextItem(start: null, direction: ArrowDirection.Up); 4901actual = toolStrip.DropDown.GetNextItem(start: items[0], direction: ArrowDirection.Up); 4905actual = toolStrip.DropDown.GetNextItem(start: null, direction: ArrowDirection.Down); 4909actual = toolStrip.DropDown.GetNextItem(start: items[0], direction: ArrowDirection.Down); 4913actual = toolStrip.DropDown.GetNextItem(start: items[4], direction: ArrowDirection.Down);
System\Windows\Forms\ToolStripRendererTests.cs (8)
28foreach (ArrowDirection arrowDirection in Enum.GetValues(typeof(ArrowDirection))) 34yield return new object[] { null, Rectangle.Empty, Color.Empty, ArrowDirection.Left - 1 }; 35yield return new object[] { null, Rectangle.Empty, Color.Empty, ArrowDirection.Up + 1 }; 36yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4), Color.Red, ArrowDirection.Left - 1 }; 37yield return new object[] { new SubToolStripItem(), new Rectangle(1, 2, 3, 4), Color.Red, ArrowDirection.Up + 1 }; 42public void ToolStripRenderer_DrawArrow_Invoke_CallsRenderArrow(ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection) 722public void ToolStripRenderer_OnRenderArrow_Invoke_Nop(ToolStripItem toolStripItem, Rectangle arrowRectangle, Color arrowColor, ArrowDirection arrowDirection)
System\Windows\Forms\ToolStripTests.cs (14)
4775[EnumData<ArrowDirection>] 4776public void ToolStrip_GetNextItem_NoItems_ReturnsNull(ArrowDirection direction) 4784[InvalidEnumData<ArrowDirection>] 4785public void ToolStrip_GetNextItem_InvalidDirection_ThrowsInvalidEnumArgumentException(ArrowDirection direction) 4821ToolStripItem actual = toolStrip.GetNextItem(toolStrip.Items[0], ArrowDirection.Right); 4842ToolStripItem nextToolStripItem1 = toolStrip.GetNextItem(toolStripButton1, ArrowDirection.Right); 4843ToolStripItem nextToolStripItem2 = toolStrip.GetNextItem(toolStripButton2, ArrowDirection.Right); 4844ToolStripItem nextToolStripItem3 = toolStrip.GetNextItem(toolStripButton3, ArrowDirection.Right); 4867ToolStripItem actual = toolStrip.GetNextItem(toolStrip.Items[0], ArrowDirection.Left); 4888ToolStripItem previousToolStripItem1 = toolStrip.GetNextItem(toolStripButton1, ArrowDirection.Left); 4889ToolStripItem previousToolStripItem2 = toolStrip.GetNextItem(toolStripButton3, ArrowDirection.Left); 4890ToolStripItem previousToolStripItem3 = toolStrip.GetNextItem(toolStripButton2, ArrowDirection.Left); 7298ToolStripItem previousToolStripItem1 = toolStrip.GetNextItem(start: null, ArrowDirection.Left); 7301ToolStripItem previousToolStripItem2 = toolStrip.GetNextItem(start: null, ArrowDirection.Right);