Blazor

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

    Show / Hide Table of Contents

    Class NodePortOffset

    Represents the position of the port relative to the bounds of the node.

    Inheritance
    System.Object
    SfDiagramBase
    NodePortOffset
    BpmnSubEventOffset
    NodeAnnotationOffset
    Inherited Members
    SfDiagramBase.UpdateCollection(IList, Boolean)
    SfDiagramBase.RandomString(Int32)
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class NodePortOffset : 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 the node array.
        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" },
          // Initialize port collection
          Ports = new ObservableCollection<DiagramPort>() {
          new DiagramPort() {
             Id = "port1",
             //Set offset value to the port
             Offset = new NodePortOffset(){X= 0.5, Y= 0.5 },
             Visibility = PortVisibility.Visible,
             Style= new PortShapeStyle(){ Fill="gray"},
            }},
            };
           NodeCollection.Add(Node);
          }
       }

    Constructors

    NodePortOffset()

    Represents the position of the port relative to the bounds of the node.

    Declaration
    public NodePortOffset()

    Properties

    X

    Gets or sets x coordinate position .

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

    Y

    Gets or sets Y coordinate position.

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