LinearGradient
A linear gradient between two points, given in unit space: (0,0) is the top-left corner, (1,1) the bottom-right.
Properties
End
Where the gradient ends, in unit space. Bottom-center by default.
Type: Point
Start
Where the gradient starts, in unit space. Top-center by default.
Type: Point
Stops
The colors and where they sit along the gradient.
Type: IList<GradientStop>
Methods
Horizontal
A leading-to-trailing gradient through evenly spaced colors.
| Parameter | Summary |
|---|---|
Color colors | The sequence of colors to spread. |
Returns
LinearGradient: A new horizontal linear gradient.
Vertical
A top-to-bottom gradient through evenly spaced colors.
| Parameter | Summary |
|---|---|
Color colors | The sequence of colors to spread. |
Returns
LinearGradient: A new vertical linear gradient.