A LinearGradientBrush paints an area with a linear gradient. A linear gradient defines a gradient along a line. The line's end points are defined by the StartPoint and EndPoint properties of the linear gradient. A LinearGradientBrush brush paints its GradientStops along this line.
The default linear gradient is diagonal. In the default, the StartPoint of a linear gradient is a Point with value 0,0, the upper-left corner of the area being painted, and its EndPoint is a Point with value 1,1, the lower-right corner of the area being painted. The colors in the resulting gradient are interpolated along the diagonal path.
The following illustration shows a diagonal gradient. A line was added to highlight the interpolation path of the gradient from the start point to the end point.
A diagonal linear gradient
.png)
The next illustration shows the same linear gradient, but with highlighted gradient stops.
A diagonal linear gradient with highlighted gradient stops
.png)
It is possible to specify a gradient axis that does not completely fill area being painted. When this occurs, the SpreadMethod property determines how the remaining area is painted.