Class GradientBrush
Defines a smooth transition from one color to the next while painting the node.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public abstract class GradientBrush : DiagramObject, IDiagramObject, ICloneable
Constructors
GradientBrush()
Initializes a new instance of the Gradient.
Declaration
protected GradientBrush()
GradientBrush(GradientBrush)
Creates a new instance of the GradientBrush from the given Gradient.
Declaration
protected GradientBrush(GradientBrush src)
Parameters
Type | Name | Description |
---|---|---|
GradientBrush | src | Gradient. |
Properties
GradientStops
Gets or sets the color and the position where the previous color transition ends, and a new color transition starts.
Declaration
public DiagramObjectCollection<GradientStop> GradientStops { get; set; }
Property Value
Type |
---|
DiagramObjectCollection<GradientStop> |
Examples
Node Node = new Node()
{
Style = new ShapeStyle()
{
Gradient = new LinearGradientBrush()
{
//Start point of linear gradient
X1 = 0,
Y1 = 0,
//End point of linear gradient
X2 = 50,
Y2 = 50,
//Sets an array of stop objects
GradientStops = new DiagramObjectCollection<GradientStop>()
{
new GradientStop(){ Color = "white", Offset = 0},
new GradientStop(){ Color = "#6BA5D7", Offset = 100}
},
}
},
};
Implements
System.ICloneable