This documentation is archived and is not being maintained.

Blend Class

Defines a blend pattern for a LinearGradientBrush object. This class cannot be inherited.

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


[Visual Basic]
NotInheritable Public Class Blend
public sealed class Blend
public __gc __sealed class Blend
public class Blend

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.


Gradients are commonly used to smoothly shade the interiors of shapes. A blend pattern is defined by two arrays (Factors and Positions) that each contain the same number of elements. Each element of the Positions array represents a proportion of the distance along the gradient line. Each element of the Factors array represents the proportion of the starting and ending colors in the gradient blend at the position along the gradient line represented by the corresponding element in the Positions array.

For example, if corresponding elements of the Positions and Factors arrays are 0.2 and 0.3, respectively, for a linear gradient from blue to red along a 100-pixel line, the color 20 pixels along that line (20 percent of the distance) consists of 30 percent blue and 70 percent red.


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

Blend Members | System.Drawing.Drawing2D Namespace