255 references to ToolStripTextDirection
System.Windows.Forms (30)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
1687
[DefaultValue(
ToolStripTextDirection
.Horizontal)]
1690
public virtual
ToolStripTextDirection
TextDirection
1694
ToolStripTextDirection
textDirection = Properties.GetValueOrDefault(s_propTextDirection,
ToolStripTextDirection
.Horizontal);
1696
if (textDirection ==
ToolStripTextDirection
.Inherit)
1698
textDirection =
ToolStripTextDirection
.Horizontal;
1706
Properties.AddOrRemoveValue(s_propTextDirection, value, defaultValue:
ToolStripTextDirection
.Horizontal);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (2)
419
[DefaultValue(
ToolStripTextDirection
.Horizontal)]
420
public override
ToolStripTextDirection
TextDirection
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
776
[DefaultValue(
ToolStripTextDirection
.Horizontal)]
779
public override
ToolStripTextDirection
TextDirection
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (2)
36
if (_ownerItem.TextDirection ==
ToolStripTextDirection
.Horizontal)
55
if (_ownerItem.TextDirection ==
ToolStripTextDirection
.Horizontal)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (10)
1900
public virtual
ToolStripTextDirection
TextDirection
1904
ToolStripTextDirection
textDirection = Properties.GetValueOrDefault(s_textDirectionProperty,
ToolStripTextDirection
.Inherit);
1906
if (textDirection ==
ToolStripTextDirection
.Inherit)
1915
textDirection = (Owner is null) ?
ToolStripTextDirection
.Horizontal : Owner.TextDirection;
1924
Properties.AddOrRemoveValue(s_textDirectionProperty, value, defaultValue:
ToolStripTextDirection
.Inherit);
2970
ToolStripTextDirection
textDirection = Properties.GetValueOrDefault(s_textDirectionProperty,
ToolStripTextDirection
.Inherit);
2972
if (textDirection ==
ToolStripTextDirection
.Inherit)
3417
public virtual void ResetTextDirection() => TextDirection =
ToolStripTextDirection
.Inherit;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
148
if (Owner.TextDirection !=
ToolStripTextDirection
.Horizontal)
System\Windows\Forms\Controls\ToolStrips\ToolStripItemTextRenderEventArgs.cs (1)
101
public
ToolStripTextDirection
TextDirection { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
874
if (e.TextDirection !=
ToolStripTextDirection
.Horizontal && textRect.Width > 0 && textRect.Height > 0)
883
textBmp.RotateFlip((e.TextDirection ==
ToolStripTextDirection
.Vertical90) ? RotateFlipType.Rotate90FlipNone : RotateFlipType.Rotate270FlipNone);
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (2)
219
[DefaultValue(
ToolStripTextDirection
.Horizontal)]
220
public override
ToolStripTextDirection
TextDirection
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonButton.cs (1)
63
public override
ToolStripTextDirection
TextDirection
System.Windows.Forms.Tests (225)
System\Windows\Forms\MdiControlStripTests.cs (1)
141
Assert.Equal(
ToolStripTextDirection
.Horizontal, mdiControlStrip.TextDirection);
System\Windows\Forms\MenuStripTests.cs (1)
139
Assert.Equal(
ToolStripTextDirection
.Horizontal, control.TextDirection);
System\Windows\Forms\StatusStripTests.cs (1)
142
Assert.Equal(
ToolStripTextDirection
.Horizontal, control.TextDirection);
System\Windows\Forms\ToolStripButtonTests.cs (11)
87
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
168
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
255
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
345
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
433
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
531
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
1282
TextDirection =
ToolStripTextDirection
.Vertical270,
1317
Assert.Equal(
ToolStripTextDirection
.Vertical270, e.TextDirection);
1373
TextDirection =
ToolStripTextDirection
.Vertical270,
1408
Assert.Equal(
ToolStripTextDirection
.Vertical270, e.TextDirection);
1470
TextDirection =
ToolStripTextDirection
.Vertical270,
System\Windows\Forms\ToolStripControlHostTests.cs (13)
116
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
2330
yield return new object[] {
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal };
2331
yield return new object[] {
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal };
2332
yield return new object[] {
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90 };
2333
yield return new object[] {
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270 };
2338
public void ToolStripControlHost_TextDirection_Set_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected)
2353
[InvalidEnumData<
ToolStripTextDirection
>]
2354
public void ToolStripControlHost_TextDirection_SetInvalid_ThrowsInvalidEnumArgumentException(
ToolStripTextDirection
value)
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
87
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
176
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
275
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
383
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
System\Windows\Forms\ToolStripDropDownTests.cs (21)
147
Assert.Equal(
ToolStripTextDirection
.Horizontal, control.TextDirection);
2748
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal, 1)]
2749
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal, 1)]
2750
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90, 1)]
2751
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270, 1)]
2752
public void ToolStripDropDown_TextDirection_Set_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected, int expectedLayoutCallCount)
2777
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal, 1)]
2778
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal, 1)]
2779
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90, 1)]
2780
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270, 1)]
2781
public void ToolStripDropDown_TextDirection_SetWithHandle_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected, int expectedLayoutCallCount)
System\Windows\Forms\ToolStripItemTests.cs (80)
86
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
171
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
266
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
8496
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal)]
8497
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal)]
8498
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90)]
8499
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270)]
8500
public void ToolStripItem_TextDirection_GetWithOwner_ReturnsExpected(
ToolStripTextDirection
ownerTextDirection,
ToolStripTextDirection
expected)
8514
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal)]
8515
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal)]
8516
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90)]
8517
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270)]
8518
public void ToolStripItem_TextDirection_GetWithParent_ReturnsExpected(
ToolStripTextDirection
parentTextDirection,
ToolStripTextDirection
expected)
8536
TextDirection =
ToolStripTextDirection
.Vertical90
8540
TextDirection =
ToolStripTextDirection
.Vertical270
8547
Assert.Equal(
ToolStripTextDirection
.Vertical270, item.TextDirection);
8552
yield return new object[] {
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal };
8553
yield return new object[] {
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal };
8554
yield return new object[] {
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90 };
8555
yield return new object[] {
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270 };
8560
public void ToolStripItem_TextDirection_Set_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected)
8575
yield return new object[] {
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal };
8576
yield return new object[] {
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal };
8577
yield return new object[] {
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90 };
8578
yield return new object[] {
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270 };
8583
public void ToolStripItem_TextDirection_SetWithOwner_GetReturnsExpected(
ToolStripTextDirection
ownerTextDirection,
ToolStripTextDirection
value,
ToolStripTextDirection
expected)
8625
public void ToolStripItem_TextDirection_SetWithOwnerWithHandle_GetReturnsExpected(
ToolStripTextDirection
ownerTextDirection,
ToolStripTextDirection
value,
ToolStripTextDirection
expected)
8680
public void ToolStripItem_TextDirection_SetWithParent_GetReturnsExpected(
ToolStripTextDirection
parentTextDirection,
ToolStripTextDirection
value,
ToolStripTextDirection
expected)
8715
public void ToolStripItem_TextDirection_SetWithParentWithHandle_GetReturnsExpected(
ToolStripTextDirection
parentTextDirection,
ToolStripTextDirection
value,
ToolStripTextDirection
expected)
8762
[InvalidEnumData<
ToolStripTextDirection
>]
8763
public void ToolStripItem_TextDirection_SetInvalid_ThrowsInvalidEnumArgumentException(
ToolStripTextDirection
value)
8776
item.TextDirection =
ToolStripTextDirection
.Vertical270;
8777
Assert.Equal(
ToolStripTextDirection
.Vertical270, item.TextDirection);
8780
item.TextDirection =
ToolStripTextDirection
.Vertical90;
8781
Assert.Equal(
ToolStripTextDirection
.Vertical90, item.TextDirection);
8784
item.TextDirection =
ToolStripTextDirection
.Horizontal;
8785
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
8789
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
8800
item.TextDirection =
ToolStripTextDirection
.Vertical270;
8801
Assert.Equal(
ToolStripTextDirection
.Vertical270, item.TextDirection);
8804
item.TextDirection =
ToolStripTextDirection
.Vertical90;
8805
Assert.Equal(
ToolStripTextDirection
.Vertical90, item.TextDirection);
8808
item.TextDirection =
ToolStripTextDirection
.Horizontal;
8809
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
8813
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
14241
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
14244
item.TextDirection =
ToolStripTextDirection
.Vertical90;
14246
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
14250
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
96
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
304
TextDirection =
ToolStripTextDirection
.Vertical90,
System\Windows\Forms\ToolStripRendererTests.cs (2)
304
yield return new object[] { new SubToolStripItem() { TextDirection =
ToolStripTextDirection
.Vertical270 }, "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
305
yield return new object[] { new SubToolStripItem() { TextDirection =
ToolStripTextDirection
.Vertical90 }, "Text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.MenuFont, TextFormatFlags.Left };
System\Windows\Forms\ToolStripSeparatorTests.cs (13)
84
Assert.Equal(
ToolStripTextDirection
.Horizontal, item.TextDirection);
649
yield return new object[] {
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal };
650
yield return new object[] {
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal };
651
yield return new object[] {
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90 };
652
yield return new object[] {
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270 };
657
public void ToolStripSeparator_TextDirection_Set_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected)
671
[InvalidEnumData<
ToolStripTextDirection
>]
672
public void ToolStripSeparator_TextDirection_SetInvalid_ThrowsInvalidEnumArgumentException(
ToolStripTextDirection
value)
System\Windows\Forms\ToolStripTests.cs (76)
155
Assert.Equal(
ToolStripTextDirection
.Horizontal, control.TextDirection);
310
Assert.Equal(
ToolStripTextDirection
.Horizontal, control.TextDirection);
3815
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal, 1)]
3816
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal, 1)]
3817
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90, 1)]
3818
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270, 1)]
3819
public void ToolStrip_TextDirection_Set_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected, int expectedLayoutCallCount)
3844
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal, 1)]
3845
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal, 1)]
3846
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90, 1)]
3847
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270, 1)]
3848
public void ToolStrip_TextDirection_SetWithHandle_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected, int expectedLayoutCallCount)
3886
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal, 1)]
3887
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal, 1)]
3888
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90, 1)]
3889
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270, 1)]
3890
public void ToolStrip_TextDirection_SetWithItems_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected, int expectedLayoutCallCount)
3923
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal, 1)]
3924
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal, 1)]
3925
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90, 1)]
3926
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270, 1)]
3927
public void ToolStrip_TextDirection_SetWithItemsWithTextDirection_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected, int expectedLayoutCallCount)
3932
TextDirection =
ToolStripTextDirection
.Vertical90
3936
TextDirection =
ToolStripTextDirection
.Vertical270
3951
Assert.Equal(
ToolStripTextDirection
.Vertical90, item1.TextDirection);
3952
Assert.Equal(
ToolStripTextDirection
.Vertical270, item2.TextDirection);
3959
Assert.Equal(
ToolStripTextDirection
.Vertical90, item1.TextDirection);
3960
Assert.Equal(
ToolStripTextDirection
.Vertical270, item2.TextDirection);
3966
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal, 1)]
3967
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal, 1)]
3968
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90, 1)]
3969
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270, 1)]
3970
public void ToolStrip_TextDirection_SetWithItemsWithHandle_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected, int expectedLayoutCallCount)
4025
[InlineData(
ToolStripTextDirection
.Inherit,
ToolStripTextDirection
.Horizontal, 1)]
4026
[InlineData(
ToolStripTextDirection
.Horizontal,
ToolStripTextDirection
.Horizontal, 1)]
4027
[InlineData(
ToolStripTextDirection
.Vertical90,
ToolStripTextDirection
.Vertical90, 1)]
4028
[InlineData(
ToolStripTextDirection
.Vertical270,
ToolStripTextDirection
.Vertical270, 1)]
4029
public void ToolStrip_TextDirection_SetWithItemsWithTextDirectionWithHandle_GetReturnsExpected(
ToolStripTextDirection
value,
ToolStripTextDirection
expected, int expectedLayoutCallCount)
4034
TextDirection =
ToolStripTextDirection
.Vertical90
4038
TextDirection =
ToolStripTextDirection
.Vertical270
4064
Assert.Equal(
ToolStripTextDirection
.Vertical90, item1.TextDirection);
4065
Assert.Equal(
ToolStripTextDirection
.Vertical270, item2.TextDirection);
4075
Assert.Equal(
ToolStripTextDirection
.Vertical90, item1.TextDirection);
4076
Assert.Equal(
ToolStripTextDirection
.Vertical270, item2.TextDirection);
4090
[InvalidEnumData<
ToolStripTextDirection
>]
4091
public void ToolStrip_TextDirection_SetInvalidValue_ThrowsInvalidEnumArgumentException(
ToolStripTextDirection
value)