System.Drawing.Drawing2D.LinearGradientBrush Class

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

See Also: LinearGradientBrush Members

Syntax

public sealed class LinearGradientBrush : System.Drawing.Brush

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 System.Drawing.Drawing2D.Blend class, the erload:System.Drawing.Drawing2D.LinearGradientBrush.SetSigmaBellShape methods, or the erload:System.Drawing.Drawing2D.LinearGradientBrush.SetBlendTriangularShape methods. Customize the direction of the gradient by specifying the System.Drawing.Drawing2D.LinearGradientMode enumeration or the angle in the constructor.

Use the LinearGradientBrush.InterpolationColors property to create a multicolor gradient.

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

Requirements

Namespace: System.Drawing.Drawing2D
Assembly: System.Drawing (in System.Drawing.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0