Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramShadow - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DiagramShadow

    Represents the shadow appearance of the objects.

    Inheritance
    System.Object
    SfDiagramBase
    DiagramShadow
    Inherited Members
    SfDiagramBase.UpdateCollection(IList, Boolean)
    SfDiagramBase.RandomString(Int32)
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramShadow : SfDiagramBase
    Remarks

    By default, the shadow effect is disabled. It can be enabled with the constraint’s property.

    Examples
      
    @using Syncfusion.Blazor.Diagrams
    @using System.Collections.ObjectModel
    <SfDiagram Height="600px" Nodes="@NodeCollection">
    </SfDiagram>
    @code{
       public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>() { };
       protected override void OnInitialized()
       {
        // A node is created and stored in nodes array.
        DiagramNode Node = new DiagramNode()
        {
            // Position of the node
            OffsetX = 250,
            OffsetY = 250,
            // Size of the node
            Width = 100,
            Height = 100,
            Style = new NodeShapeStyle() { Fill = "#6BA5D7", StrokeColor = "white" },
            Constraints = NodeConstraints.Default | NodeConstraints.Shadow,
            // Custom Shadow of the node
            Shadow = new DiagramShadow()
            {
             Angle = 50,
             Opacity = 0.8,
             Distance = 9
            }
          };
         NodeCollection.Add(Node);
       }
     }

    Constructors

    DiagramShadow()

    Represents the shadow appearance of the objects.

    Declaration
    public DiagramShadow()

    Properties

    Angle

    Specifies the Angle of the shadow. By default, it is 45.

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

    Color

    Specifies the color of the shadow.

    Declaration
    public string Color { get; set; }
    Property Value
    Type Description
    System.String

    Distance

    Specifies the Distance of shadow. By default, it is 5px.

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

    Opacity

    Specifies the Opacity of shadow. The opacity value ranges from 0 to 1. By default, it is 0.7.

    Declaration
    public double Opacity { get; set; }
    Property Value
    Type Description
    System.Double
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved