Blazor

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

    Show / Hide Table of Contents

    Class PortShapes

    Specifies the shape of the ports.

    Inheritance
    System.Object
    PortShapes
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class PortShapes : Enum
    Remarks
    To know more about using port shapes, refer to this link
    1. Ports
    2. Diagram Methods
    To apply X port shape, use the below code.
    Examples
    <SfDiagram Height="600px" Nodes="@NodeCollection">
    </SfDiagram>
    @code{
       ObservableCollection<DiagramNode> NodeCollection;
       protected override void OnInitialized()
       {
           //Initialize the NodeCollection.
           NodeCollection = new ObservableCollection<DiagramNode>();
           DiagramNode Node = new DiagramNode()
           {
               Id = "node1",
               Height = 100,
               Width = 100,
               OffsetX = 100,
               OffsetY = 100,
           };
           Node.Ports = new ObservableCollection<DiagramPort>()
           {
               new DiagramPort()
               {
                   Id="port1",
                   Offset=new NodePortOffset(){X=0,Y=0.5},
                   Shape=PortShapes.X,
                   Visibility=PortVisibility.Visible,
                   //sets the PortConstraints...
                   Constraints=PortConstraints.None
               }
           };
           NodeCollection.Add(Node);
       }
    }

    Fields

    Circle

    Sets the port shape as Circle.

    Declaration
    public const PortShapes Circle
    Field Value
    Type Description
    PortShapes

    Custom

    Sets the port shape as Custom.

    Declaration
    public const PortShapes Custom
    Field Value
    Type Description
    PortShapes

    Square

    Sets the port shape as Square.

    Declaration
    public const PortShapes Square
    Field Value
    Type Description
    PortShapes

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32

    X

    Sets the port shape as X.

    Declaration
    public const PortShapes X
    Field Value
    Type Description
    PortShapes
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved