Class DiagramExpandIcon
Represents Expand icon of the node.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class DiagramExpandIcon : DiagramIcon, IDiagramObject, ICloneable
Remarks
DiagramExpandIcon is the Expand icon model that represents the state of the Node and also allows its Child Nodes to be Collapsed.
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()
{
ID = "node1",
//Size of the node
Height = 100,
Width = 100,
//Position of the node
OffsetX = 100,
OffsetY = 100,
ExpandIcon = new DiagramExpandIcon()
{
Shape = DiagramExpandIcons.Minus,
},
CollapseIcon= new DiagramCollapseIcon()
{
Shape = DiagramCollapseIcons.Plus,
}
};
nodes.Add(node);
}
}
Constructors
DiagramExpandIcon()
Initializes a new instance of the Expand Icon.
Declaration
public DiagramExpandIcon()
DiagramExpandIcon(DiagramExpandIcon)
Initializes a new instance of the Expand Icon which is the copy of a existing icon.
Declaration
public DiagramExpandIcon(DiagramExpandIcon src)
Parameters
Type | Name | Description |
---|---|---|
DiagramExpandIcon | src |
Properties
Shape
Gets or sets the Shape of the Expand Icon.
Declaration
public DiagramExpandIcons Shape { get; set; }
Property Value
Type |
---|
DiagramExpandIcons |
Remarks
The Diagram provides some built-in DiagramExpandIcons, such as Minus,ArrowUp,Template, etc. You can also add custom shapes such as Path Shape to the Expand Icon.
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 = DiagramExpandIcons.Path,
PathData = "M100,200 C100,100 250,100 250,200 S400,300 400,200",
}
};
nodes.Add(node);
}
}
Methods
Clone()
Creates a new ExpandIcon that is a copy of the current ExpandIcon.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | ExpandIconShapeModel |
Overrides
Implements
System.ICloneable