menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class IconPadding - API Reference

    Show / Hide Table of Contents

    Class IconPadding

    Represents the space inside the border of an icon.

    Inheritance
    System.Object
    SfDiagramBase
    IconPadding
    Inherited Members
    SfDiagramBase.UpdateCollection(IList, Boolean)
    SfDiagramBase.RandomString(Int32)
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class IconPadding : SfDiagramBase
    Examples
    <SfDiagram Height="600px" Nodes="@NodeCollection">
    </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,
              Fill = "red",
              CornerRadius = 3
              //set padding to expand icon
              Padding = new IconPadding { Top = 0, Left = 0, Bottom = 0, Right = 0 },
             },
          };
          NodeCollection.Add(Node);
        }
      }

    Constructors

    IconPadding()

    Represents the space inside the border of an icon.

    Declaration
    public IconPadding()

    Properties

    Bottom

    Specifies the space to be left within the icon border on the bottom. By default, it is set to 2.

    Declaration
    public Nullable<double> Bottom { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Left

    Specifies the space to be left within the icon border on the left. By default, it is set to 2.

    Declaration
    public Nullable<double> Left { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Right

    Specifies the space to be left within the icon border on the right. By default, it is set to 2.

    Declaration
    public Nullable<double> Right { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Top

    Specifies the space to be left within the icon border on the top. By default, it is set to 2.

    Declaration
    public Nullable<double> Top { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved