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