menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PointPort - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PointPort

    Defines the behavior of a port (connection point) that sticks to a point.

    Inheritance
    System.Object
    DiagramObject
    Port
    PointPort
    Implements
    IDiagramObject
    System.ICloneable
    Inherited Members
    DiagramObject.GetParent()
    DiagramObject.OnPropertyChanged(String, Object, Object, IDiagramObject)
    Port.AdditionalInfo
    Port.ConnectionDirection
    Port.Constraints
    Port.Height
    Port.HorizontalAlignment
    Port.ID
    Port.InEdges
    Port.Margin
    Port.OutEdges
    Port.PathData
    Port.Shape
    Port.Style
    Port.Tooltip
    Port.VerticalAlignment
    Port.Visibility
    Port.Width
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PointPort : Port, IDiagramObject, ICloneable
    Remarks

    Ports act as the connection points of node and allow them to create connections with only those specific points. There may be any number of ports in a node. You can able to modify the Ports appearance, visibility, positioning, and can add custom shapes to it.

    Examples
    Node node = new Node()
    {
        // Position of the node
        OffsetX = 250,
        OffsetY = 250,
        // Size of the node
        Width = 100,
        Height = 100,
        Style = new ShapeStyle() { Fill = "#6495ED", StrokeColor = "white" },
        // Initialize port collection
        Ports = new DiagramObjectCollection<PointPort>()
        {
            // Sets the position for the port
            new PointPort() 
            { 
            Style = new ShapeStyle() { Fill = "gray" }, 
            Offset = new DiagramPoint() { X = 0.5, Y = 0.5 }, 
            Visibility = PortVisibility.Visible
            }
        }
    };

    Constructors

    PointPort()

    Initializes a new instance of the PointPort.

    Declaration
    public PointPort()

    PointPort(PointPort)

    Creates a new instance of the PointPort from the given PointPort.

    Declaration
    public PointPort(PointPort src)
    Parameters
    Type Name Description
    PointPort src

    PointPort

    Properties

    Offset

    Defines the position of the port with respect to the boundaries of node.

    Declaration
    public DiagramPoint Offset { get; set; }
    Property Value
    Type
    DiagramPoint
    Examples
    Node node = new Node()
    {
        Ports = new DiagramObjectCollection<PointPort>()
        {
            // Sets the position for the port
            new PointPort() 
            { 
                Style = new ShapeStyle() { Fill = "gray" }, 
                Offset = new DiagramPoint() { X = 0.5, Y = 0.5 }, 
                Visibility = PortVisibility.Visible
            }
        }
    };

    Methods

    Clone()

    Creates a new object that is a copy of the current port.

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object

    PointPort

    Overrides
    Port.Clone()

    Implements

    IDiagramObject
    System.ICloneable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved