menu

Blazor

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

    Show / Hide Table of Contents

    Class DiagramContainer

    Represents a container used to group related diagram objects.

    Inheritance
    System.Object
    CommonElement
    DiagramElement
    DiagramContainer
    DiagramCanvas
    StackPanel
    Inherited Members
    CommonElement.ActualSize
    CommonElement.Bounds
    CommonElement.CornerRadius
    CommonElement.DesiredSize
    CommonElement.Flip
    CommonElement.FlipMode
    CommonElement.Height
    CommonElement.HorizontalAlignment
    CommonElement.ID
    CommonElement.IsDirt
    CommonElement.Margin
    CommonElement.MaxHeight
    CommonElement.MaxWidth
    CommonElement.MinHeight
    CommonElement.MinWidth
    CommonElement.OffsetX
    CommonElement.OffsetY
    CommonElement.OuterBounds
    CommonElement.ParentID
    CommonElement.Pivot
    CommonElement.RelativeMode
    CommonElement.RotationAngle
    CommonElement.Shadow
    CommonElement.Style
    CommonElement.VerticalAlignment
    CommonElement.Visible
    CommonElement.Width
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramContainer : DiagramElement
    Remarks

    The DiagramContainer serves as a grouping mechanism for diagram elements. It extends DiagramElement functionality to support child element management.

    Constructors

    DiagramContainer()

    Initializes a new instance of the DiagramContainer class.

    Declaration
    public DiagramContainer()
    Remarks

    This default constructor creates a new DiagramContainer with default property values and initializes the base container functionality. All container-specific properties are set to their default values.

    DiagramContainer(DiagramContainer)

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

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

    A DiagramContainer instance to copy from. If null, only the base class initialization is performed.

    Remarks

    This copy constructor creates a deep copy of the specified DiagramContainer instance, preserving all container-specific properties including Syncfusion.Blazor.Diagram.DiagramContainer.PrevRotateAngle, Syncfusion.Blazor.Diagram.DiagramContainer.MeasureChildren, Syncfusion.Blazor.Diagram.DiagramContainer.DesiredBounds, and Padding settings.

    The constructor safely handles null input by performing null-checking before copying properties. When src is null, only the base class constructor is invoked.

    Properties

    Children

    Gets or sets the collection of child elements(DiagramCanvas, Diagram Element) within the DiagramContainer.

    Declaration
    public ObservableCollection<CommonElement> Children { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<CommonElement>

    An System.Collections.ObjectModel.ObservableCollection<> of CommonElement containing the child elements such as DiagramCanvas and Diagram Element. The default value is an empty collection.

    Remarks

    This collection manages all child elements within the container and supports automatic change notifications through the ObservableCollection implementation.Child elements are positioned according to the container's layout properties.

    Padding

    Gets or sets the space between the DiagramContainer and its immediate children.

    Declaration
    public DiagramThickness Padding { get; set; }
    Property Value
    Type Description
    DiagramThickness

    A DiagramThickness representing the padding space applied to all sides of the container's content area. The default value is new DiagramThickness() { Left = 0, Right = 0, Top = 0, Bottom = 0 }.

    Remarks

    Creates internal spacing within the container boundaries, affecting child element positioning. Each side can be set independently, and changes trigger layout recalculation.

    Methods

    Clone()

    Creates a new DiagramContainer element that is a deep copy of the current container instance.

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

    A new DiagramContainer object that is a complete copy of the current container, including all child elements, properties, and layout configurations. The returned object is an independent instance that can be modified without affecting the original container.

    Overrides
    DiagramElement.Clone()
    Remarks

    Performs a deep copy operation, preserving all container properties, child elements, and layout configurations.

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