LinearGradient

A linear gradient between two points, given in unit space: (0,0) is the top-left corner, (1,1) the bottom-right.
public sealed class LinearGradient : Brush

Properties

End

Where the gradient ends, in unit space. Bottom-center by default.

Type: Point

public Point End { get; init; }

Start

Where the gradient starts, in unit space. Top-center by default.

Type: Point

public Point Start { get; init; }

Stops

The colors and where they sit along the gradient.

Type: IList<GradientStop>

public IList<GradientStop> Stops { get; init; }

Methods

Horizontal

A leading-to-trailing gradient through evenly spaced colors.

public static LinearGradient Horizontal(
  params Color[] colors)
ParameterSummary
Color colorsThe sequence of colors to spread.

Returns

Vertical

A top-to-bottom gradient through evenly spaced colors.

public static LinearGradient Vertical(
  params Color[] colors)
ParameterSummary
Color colorsThe sequence of colors to spread.

Returns