Class StackPanel
Represents the class that arranges child elements into a single line that can be oriented horizontally or vertically.
Inherited Members
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
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. |