menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Shadow - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Shadow

    Represents the shadow appearance of the diagram object.

    Inheritance
    System.Object
    DiagramObject
    Shadow
    Implements
    IDiagramObject
    System.ICloneable
    Inherited Members
    DiagramObject.GetParent()
    DiagramObject.OnPropertyChanged(String, Object, Object, IDiagramObject)
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class Shadow : DiagramObject, IDiagramObject, ICloneable
    Remarks

    The Shadow class allows customization of shadow attributes such as angle, color, opacity, and distance from the object.

    Examples
    Node node = new Node()
    {
        OffsetX = 250,
        OffsetY = 250,
        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

    An existing Shadow object to copy from.

    Properties

    Angle

    Gets or sets the angle of the shadow in degrees.

    Declaration
    public double Angle { get; set; }
    Property Value
    Type Description
    System.Double

    A System.Double representing the angle of the shadow. 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

    A System.String representing the color of the shadow. The default value is "lightgrey".

    Examples
    Node node = new Node()
    {
        Constraints = NodeConstraints.Default | NodeConstraints.Shadow;
        Shadow = new Shadow() {  Color = "green" };
    };

    Distance

    Gets or sets the distance of the shadow from the object.

    Declaration
    public double Distance { get; set; }
    Property Value
    Type Description
    System.Double

    A System.Double representing the distance in pixels. The default value is 5.

    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, ranging from 0 to 1.

    Declaration
    public double Opacity { get; set; }
    Property Value
    Type Description
    System.Double

    A System.Double representing the opacity. 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

    A new Shadow object that is a copy of the current instance.

    Overrides
    DiagramObject.Clone()

    Implements

    IDiagramObject
    System.ICloneable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved