Class DiagramCollapseIcon
Represents Collapse icon of the node.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class DiagramCollapseIcon : DiagramIcon, IDiagramObject, ICloneable
Remarks
DiagramCollapseIcon is the Collapse icon model that represents the state of the Node and also allows its Child Nodes to be Expanded.
Examples
<SfDiagramComponent Height="600px" Nodes="@nodes" />
@code
{
//Initialize the node collection with node and with Expand & CollapseIcon
DiagramObjectCollection<Node> nodes = new DiagramObjectCollection<Node>();
protected override void OnInitialized()
{
Node node = new Node()
{
ExpandIcon = new DiagramExpandIcon()
{
Shape = DiagramExpandIcons.Minus,
},
CollapseIcon= new DiagramCollapseIcon()
{
Shape = DiagramCollapseIcons.Plus,
}
};
nodes.Add(node);
}
}
Constructors
DiagramCollapseIcon()
Initializes a new instance of the Collapse Icon.
Declaration
public DiagramCollapseIcon()
DiagramCollapseIcon(DiagramCollapseIcon)
Initializes a new instance of the Collapse Icon which is the copy of a existing icon.
Declaration
public DiagramCollapseIcon(DiagramCollapseIcon src)
Parameters
Type | Name | Description |
---|---|---|
DiagramCollapseIcon | src |
Properties
Shape
Gets or sets the shape of the Collapse Icon.
Declaration
public DiagramCollapseIcons Shape { get; set; }
Property Value
Type |
---|
DiagramCollapseIcons |
Remarks
The Diagram provides some built-in DiagramCollapseIcons, such as Plus,ArrowDown,Template, etc. You can also add custom shapes such as Path Shape to the Collapse Icon.
Examples
<SfDiagramComponent Height="600px" Nodes="@nodes" />
@code
{
DiagramObjectCollection<Node> nodes = new DiagramObjectCollection<Node>();
protected override void OnInitialized()
{
Node node = new Node()
{
ExpandIcon = new DiagramExpandIcon()
{
Shape = DiagramExpandIcons.Minus,
},
CollapseIcon= new DiagramCollapseIcon()
{
Shape = DiagramCollapseIcons.Plus,
}
};
nodes.Add(node);
}
}
Methods
Clone()
Creates a new Collapse icon that is a copy of the current Collapse icon.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | CollapseIconShapeModel |
Overrides
Implements
System.ICloneable