Class LinearGradientBrush
Represents a linear gradient brush.
Namespace: Syncfusion.SfDiagram.XForms
Assembly: Syncfusion.SfDiagram.XForms.dll
Syntax
public class LinearGradientBrush : Brush
Constructors
LinearGradientBrush()
Initializes a new instance of the LinearGradientBrush class.
Declaration
public LinearGradientBrush()
LinearGradientBrush(Single, Single, Single, Single, Color[])
Initializes a new instance of the LinearGradientBrush class.
Declaration
public LinearGradientBrush(float startX, float startY, float endX, float endY, Color[] colors)
Parameters
Type | Name | Description |
---|---|---|
System.Single | startX | X coordinate of the starting point. |
System.Single | startY | Y coordinate of the starting point. |
System.Single | endX | X coordinate of the ending point. |
System.Single | endY | Y coordinate of the ending point.. |
Xamarin.Forms.Color[] | colors | Colors. |
LinearGradientBrush(Color[], Single[])
Initializes a new instance of the LinearGradientBrush class.
Declaration
public LinearGradientBrush(Color[] colors, float[] positions)
Parameters
Type | Name | Description |
---|---|---|
Xamarin.Forms.Color[] | colors | Colors. |
System.Single[] | positions | position for each color. |
Properties
Colors
Gets or sets the colors for gradient brush.
Declaration
public Color[] Colors { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color[] |
EndX
Gets or sets the X coordinates of the ending point.
Declaration
public float EndX { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The end x. |
EndY
Gets or sets the Y coordinates of the ending point.
Declaration
public float EndY { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The end y. |
Positions
Gets or sets the position for gradient brush color.
Declaration
public float[] Positions { get; set; }
Property Value
Type |
---|
System.Single[] |
StartX
Gets or sets the X coordinates of the starting point.
Declaration
public float StartX { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The start x. |
StartY
Gets or sets the Y coordinates of the starting point.
Declaration
public float StartY { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The start y. |