menu

Blazor

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

    Show / Hide Table of Contents

    Class ConnectorPort

    Represents a port that can be positioned along a path on a connector in a diagram.

    Inheritance
    System.Object
    DiagramObject
    Port
    ConnectorPort
    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 ConnectorPort : Port, IDiagramObject, ICloneable
    Remarks

    This class defines a port object that can be positioned along a path of a connector in a diagram. It includes properties to specify the position along the path, displacement from the original position, and alignment relative to the connector's path.

    Examples
    Connector Connector = new Connector()
    {
        Ports = new DiagramObjectCollection<ConnectorPort>()
        {
            //Set the position for the port
            new ConnectorPort()
            {
                PathPosition = 1,
                Style = new ShapeStyle(){Fill = "green"},
                Visibility = PortVisibility.Visible
            }
        }
    };

    Constructors

    ConnectorPort()

    Initializes a new instance of the ConnectorPort.

    Declaration
    public ConnectorPort()

    ConnectorPort(ConnectorPort)

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

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

    ConnectorPort

    Properties

    PathPosition

    Gets or sets the offset of the port along the path on the connector.

    Declaration
    public double PathPosition { get; set; }
    Property Value
    Type Description
    System.Double

    A System.Double representing the offset along the path. The default value is 0.0, and it should be between 0 and 1.

    Remarks

    This property allows setting the specific point on the connector's path where the port should be aligned.

    Examples
    Connector connector = new Connector()
    {
        Ports = new DiagramObjectCollection<ConnectorPort>()
        {
            // Set the position for the port
            new ConnectorPort()
            {
                PathPosition = 1,
                Style = new ShapeStyle(){Fill = "green"},
                Visibility = PortVisibility.Visible
            }
        }
    };

    Methods

    Clone()

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

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

    A new instance of ConnectorPort that is a copy of the current object.

    Overrides
    Port.Clone()

    Implements

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