Class ExpandIconMargin
Represents the space around the ExpandIcon.
Inherited Members
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class ExpandIconMargin : DiagramMargin
Remarks
• Node has different kinds of states such as expand state and collapse state. When the user clicks ExpandIcon, all the children from the respective node will get expanded whereas CollapseIcon is clicked, then all children from the respective node will get collapsed. |
• This property allows the user to set the space that the icon can be moved from its actual position. |
Examples
<SfDiagram Height="600px" Nodes="@NodeCollection">
<DiagramSnapSettings Constraints = "SnapConstraints.None" ></ DiagramSnapSettings >
</ SfDiagram >
@code{
public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>() { };
protected override void OnInitialized()
{
// A node is created and stored in nodes collection.
DiagramNode Node = new DiagramNode()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Style = new NodeShapeStyle() { Fill = "#6BA5D7", StrokeColor = "white" },
ExpandIcon = new NodeExpandIcon()
{
Width = 20,
Height = 20,
Shape = IconShapes.ArrowDown,
//sets the margin value to an icon
Margin = new ExpandIconMargin { Top = 10, Bottom = 10, Left = 10, Right = 0 }
}
};
NodeCollection.Add(Node);
}
}
Constructors
ExpandIconMargin()
Represents the space around the ExpandIcon.
Declaration
public ExpandIconMargin()