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