Class DiagramContainer
Represents a container used to group related diagram objects.
Inherited Members
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 |
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
Remarks
Performs a deep copy operation, preserving all container properties, child elements, and layout configurations.