menu

Blazor

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

    Show / Hide Table of Contents

    Class DiagramObject

    Represents the base class for all diagram objects in the SfDiagramComponent. This class provides fundamental functionality for property change notifications, parent-child relationships, and object lifecycle management.

    Inheritance
    System.Object
    DiagramObject
    Annotation
    BezierConnectorSettings
    ConnectorSegment
    ConnectorShape
    DecoratorSettings
    DiagramIcon
    DiagramPoint
    DiagramThickness
    DiagramTooltip
    FixedUserHandle
    GradientBrush
    GradientStop
    HyperlinkSettings
    KeyboardCommand
    NodeBase
    Port
    SegmentThumbSettings
    Shadow
    Shape
    ShapeStyle
    UserHandle
    Vector
    Implements
    IDiagramObject
    System.ICloneable
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramObject : Object, IDiagramObject, ICloneable
    Remarks

    The DiagramObject class serves as the foundation for all diagram elements including nodes, connectors, and other visual components. It implements the IDiagramObject interface to provide consistent behavior across all diagram objects.

    This class manages parent-child relationships through the internal Syncfusion.Blazor.Diagram.DiagramObject.Parent property and handles property change notifications.

    Constructors

    DiagramObject()

    Initializes a new instance of the DiagramObject.

    Declaration
    public DiagramObject()

    DiagramObject(DiagramObject)

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

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

    DiagramObject

    Methods

    Clone()

    Creates a new diagram object that is a deep copy of the current diagram object.

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

    A new DiagramObject that is a copy of the current instance. The returned object has the same property values with a separate instance.

    GetParent()

    Gets the parent object of the current diagram object in the object hierarchy.

    Declaration
    public IDiagramObject GetParent()
    Returns
    Type Description
    IDiagramObject

    An IDiagramObject representing the parent object.

    OnPropertyChanged(String, Object, Object, IDiagramObject)

    Invoked when the effective value of any property on this diagram object has been updated and propagates the change notification to the parent object.

    Declaration
    public void OnPropertyChanged(string propertyName, object newVal, object oldVal, IDiagramObject container)
    Parameters
    Type Name Description
    System.String propertyName

    The name of the property that changed. Can be null if the property name is not available.

    System.Object newVal

    The new value of the property. Can be null if the new value is null or not provided.

    System.Object oldVal

    The previous value of the property. Can be null if the old value is null or not available.

    IDiagramObject container

    The IDiagramObject that contains the changed property.

    Remarks

    This method implements the property change notification pattern used throughout the diagram framework. When a property changes on any diagram object, this method is called to propagate the change up the object hierarchy.

    Implements

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