43 references to LinearGradientMode
System.Drawing (1)
System.Drawing.cs (1)
40
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Drawing2D.
LinearGradientMode
))]
System.Drawing.Common (2)
Special\NotSupported.cs (2)
1708
public LinearGradientBrush(System.Drawing.Rectangle rect, System.Drawing.Color color1, System.Drawing.Color color2, System.Drawing.Drawing2D.
LinearGradientMode
linearGradientMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1711
public LinearGradientBrush(System.Drawing.RectangleF rect, System.Drawing.Color color1, System.Drawing.Color color2, System.Drawing.Drawing2D.
LinearGradientMode
linearGradientMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (15)
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (15)
75
yield return new object[] { new Rectangle(0, 0, 1, 2), Color.Empty, Color.Red,
LinearGradientMode
.BackwardDiagonal };
76
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Plum, Color.Red,
LinearGradientMode
.ForwardDiagonal };
77
yield return new object[] { new Rectangle(-1, -2, -3, -4), Color.Red, Color.Red,
LinearGradientMode
.Horizontal };
78
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.Plum,
LinearGradientMode
.Vertical };
83
public void Ctor_Rectangle_Color_Color_LinearGradientMode(Rectangle rectangle, Color color1, Color color2,
LinearGradientMode
linearGradientMode)
95
Assert.Equal(linearGradientMode ==
LinearGradientMode
.Horizontal, brush.Transform.IsIdentity);
100
public void Ctor_RectangleF_Color_Color_LinearGradientMode(Rectangle rectangle, Color color1, Color color2,
LinearGradientMode
linearGradientMode)
112
Assert.Equal(linearGradientMode ==
LinearGradientMode
.Horizontal, brush.Transform.IsIdentity);
206
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty,
LinearGradientMode
.BackwardDiagonal));
207
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty,
LinearGradientMode
.BackwardDiagonal));
217
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty,
LinearGradientMode
.BackwardDiagonal));
218
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty,
LinearGradientMode
.BackwardDiagonal));
224
[InlineData(
LinearGradientMode
.Horizontal - 1)]
225
[InlineData(
LinearGradientMode
.BackwardDiagonal + 1)]
226
public void Ctor_InvalidLinearGradientMode_ThrowsEnumArgumentException(
LinearGradientMode
linearGradientMode)
System.Windows.Forms (22)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (3)
94
LinearGradientMode
.Vertical);
111
LinearGradientMode
.Vertical);
122
LinearGradientMode
.Vertical);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (19)
465
FillWithDoubleGradient(ColorTable.OverflowButtonGradientBegin, ColorTable.OverflowButtonGradientMiddle, ColorTable.OverflowButtonGradientEnd, e.Graphics, edging, _iconWellGradientWidth, _iconWellGradientWidth,
LinearGradientMode
.Vertical, /*flipHorizontal=*/false);
580
LinearGradientMode
.Vertical);
637
LinearGradientMode
.Vertical);
704
FillWithDoubleGradient(begin, ColorTable.ImageMarginGradientMiddle, end, e.Graphics, bounds, _iconWellGradientWidth, _iconWellGradientWidth,
LinearGradientMode
.Horizontal, /*flipHorizontal=*/(e.ToolStrip.RightToLeft == RightToLeft.Yes));
953
private static void FillWithDoubleGradient(Color beginColor, Color middleColor, Color endColor, Graphics g, Rectangle bounds, int firstGradientWidth, int secondGradientWidth,
LinearGradientMode
mode, bool flipHorizontal)
964
if (mode ==
LinearGradientMode
.Horizontal)
1001
if (mode ==
LinearGradientMode
.Horizontal)
1091
LinearGradientMode
.Vertical);
1148
LinearGradientMode
.Horizontal);
1163
LinearGradientMode
.Horizontal);
1177
LinearGradientMode
mode = (toolStrip.Orientation == Orientation.Horizontal) ?
LinearGradientMode
.Vertical :
LinearGradientMode
.Horizontal;
1281
LinearGradientMode
mode = horizontal ?
LinearGradientMode
.Vertical :
LinearGradientMode
.Horizontal;
1417
LinearGradientMode
.Vertical);
1441
LinearGradientMode
.Vertical);
1553
LinearGradientMode
.Vertical);
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignerActionPanel.cs (2)
477
using LinearGradientBrush gradientBrush = new(rect, GradientDarkColor, GradientLightColor,
LinearGradientMode
.Horizontal);
482
using LinearGradientBrush gradientBrush = new(rect, GradientLightColor, GradientDarkColor,
LinearGradientMode
.Horizontal);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
1827
using (LinearGradientBrush brush = new(bounds, Color.White, _defaultBorderColor,
LinearGradientMode
.Vertical))