Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ExpandIconMargin - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ExpandIconMargin

    Represents the space around the ExpandIcon.

    Inheritance
    System.Object
    SfDiagramBase
    DiagramMargin
    ExpandIconMargin
    Inherited Members
    DiagramMargin.Bottom
    DiagramMargin.Left
    DiagramMargin.Right
    DiagramMargin.Top
    SfDiagramBase.UpdateCollection(IList, Boolean)
    SfDiagramBase.RandomString(Int32)
    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()
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved