menu

Blazor

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

    Show / Hide Table of Contents

    Class StackPanel

    Represents the class that arranges child elements into a single line that can be oriented horizontally or vertically.

    Inheritance
    System.Object
    CommonElement
    DiagramElement
    DiagramContainer
    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
    DiagramContainer.Children
    DiagramContainer.Padding
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class StackPanel : DiagramContainer

    Constructors

    StackPanel()

    Initializes a new instance of the StackPanel.

    Declaration
    public StackPanel()

    StackPanel(StackPanel)

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

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

    StackPanel element.

    Properties

    Orientation

    Gets or sets a value that indicates the dimension by which child elements are stacked.

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

    The default value will be Vertical.

    Examples
    <SfDiagramComponent  @bind-Nodes="Nodes" SetNodeTemplate="SetTemplate">
    </SfDiagramComponent>
    @code
    { 
      DiagramObjectCollection<Node> Nodes = new DiagramObjectCollection<Node>();
      protected override void OnInitialized()
      {
         StackPanel stackPanel = SetTemplate(null) as StackPanel;
          stackPanel.Orientation = Orientation.Horizontal;
          basicElements.Add(stackPanel);
      }
    }

    Methods

    Clone()

    Creates a new element that is a copy of the current element.

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

    StackPanel

    Overrides
    DiagramContainer.Clone()

    StretchChildren(DiagramSize)

    Stretches the child elements based on the size of the panel.

    Declaration
    protected void StretchChildren(DiagramSize size)
    Parameters
    Type Name Description
    DiagramSize size

    DiagramSize.

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