Class Shadow
Represents the shadow appearance of the diagram object.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class Shadow : DiagramObject, IDiagramObject, ICloneable
Examples
Node node = new Node()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Style = new ShapeStyle() { Fill = "#6BA5D7", StrokeColor = "white" },
Constraints = NodeConstraints.Default | NodeConstraints.Shadow,
Shadow = new Shadow()
{
Angle = 50,
Color = "Blue",
Opacity = 0.8,
Distance = 20
}
};
Constructors
Shadow()
Initializes a new instance of the Shadow.
Declaration
public Shadow()
Shadow(Shadow)
Creates a new instance of the Shadow from the given Shadow.
Declaration
public Shadow(Shadow src)
Parameters
Type | Name | Description |
---|---|---|
Shadow | src | Shadow. |
Properties
Angle
Gets or sets the angle of the shadow.
Declaration
public double Angle { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 45 |
Examples
Node node = new Node()
{
Constraints = NodeConstraints.Default | NodeConstraints.Shadow;
Shadow = new Shadow() { Angle = 20 };
};
Color
Gets or sets the color of the shadow.
Declaration
public string Color { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is light grey |
Examples
Node node = new Node()
{
Constraints = NodeConstraints.Default | NodeConstraints.Shadow;
Shadow = new Shadow() { Color = "green" };
};
Distance
Gets or sets the distance of the shadow.
Declaration
public double Distance { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 5px |
Examples
Node node = new Node()
{
Constraints = NodeConstraints.Default | NodeConstraints.Shadow;
Shadow = new Shadow() { Angle = 20, Color = "green", Distance = 20, Opacity = 0.3 };
};
Opacity
Gets or sets the Opacity of the shadow. The opacity value ranges from 0 to 1.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 0.7 |
Examples
Node node = new Node()
{
Constraints = NodeConstraints.Default | NodeConstraints.Shadow;
Shadow = new Shadow() { Angle = 20, Color = "green", Distance = 20, Opacity = 0.3 };
};
Methods
Clone()
Creates a new shadow that is a copy of the current shadow.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | Shadow |
Overrides
Implements
System.ICloneable