Export (0) Print
Expand All

LinearGradientBrush Class

Encapsulates a Brush object with a linear gradient. This class cannot be inherited.

For a list of all members of this type, see LinearGradientBrush Members.

System.Object
   System.MarshalByRefObject
      System.Drawing.Brush
         System.Drawing.Drawing2D.LinearGradientBrush

[Visual Basic]
NotInheritable Public Class LinearGradientBrush
   Inherits Brush
[C#]
public sealed class LinearGradientBrush : Brush
[C++]
public __gc __sealed class LinearGradientBrush : public Brush
[JScript]
public class LinearGradientBrush extends Brush

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

This class encapsulates both two-color gradients and custom multicolor gradients.

All linear gradients are defined along a line specified either by the width of a rectangle or by two points.

By default, a two-color linear gradient is an even horizontal linear blend from the starting color to the ending color along the specified line. Customize the blend pattern using the Blend class, the SetSigmaBellShape methods, or the SetBlendTriangularShape methods. Customize the direction of the gradient by specifying the LinearGradientMode enumeration or the angle in the constructor.

Use the InterpolationColors property to create a multicolor gradient.

The Transform property specifies a local geometric transform applied to the gradient.

Requirements

Namespace: System.Drawing.Drawing2D

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Drawing (in System.Drawing.dll)

See Also

LinearGradientBrush Members | System.Drawing.Drawing2D Namespace

Show:
© 2014 Microsoft