menu

Blazor

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

    Show / Hide Table of Contents

    Class Shape

    Represents a shape in the diagram. Shape provides the basic characteristics and behaviors of a diagram element shape.

    Inheritance
    System.Object
    DiagramObject
    Shape
    BasicShape
    BpmnActivity
    BpmnDataObject
    BpmnDataStore
    BpmnEvent
    BpmnExpandedSubProcess
    BpmnGateway
    BpmnMessage
    BpmnTextAnnotation
    FlowShape
    ImageShape
    PathShape
    TextShape
    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 Shape : DiagramObject, IDiagramObject, ICloneable
    Remarks

    It acts as a base for customization of shapes within the diagram environment.

    Constructors

    Shape()

    Initializes a new instance of the Shape.

    Declaration
    public Shape()

    Shape(Shape)

    Creates a new instance of the Shape from the given Shape.

    Declaration
    public Shape(Shape src)
    Parameters
    Type Name Description
    Shape src

    Properties

    Type

    Gets or sets the type of node shape.

    Declaration
    public NodeShapes Type { get; set; }
    Property Value
    Type Description
    NodeShapes

    A NodeShapes representing the type of shape to be used for the node. The default value is Basic.

    Remarks

    This property determines the graphical form of the node and can be adjusted to suit various design requirements in diagrammatic representations.

    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 = "#6495ED", StrokeColor = "white" },
        Shape = new BasicShape() { Shape = NodeBasicShapes.Plus, Type = NodeShapes.Basic },
    };

    Methods

    Clone()

    Creates a new Shape instance that is a copy of the current instance.

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object

    A new Shape object cloned from the current instance.

    Overrides
    DiagramObject.Clone()

    Implements

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