Class Port
Represents a named connection point on a Node that a Connector can attach to precisely, instead of connecting to the node's boundary in general.
Inherited Members
Namespace: Syncfusion.Maui.Diagram
Assembly: Syncfusion.Maui.Diagram.dll
Syntax
public class Port : DiagramElement
Remarks
Mirrors the EJ2 Diagram PointPortModel JSON shape: { id, offset: { x, y }, style }.
(0/0 is the top-left corner, 1/1 is the bottom-right corner — the same convention EJ2 uses for the
default port position, {0.5, 0.5}, the node's center). Reference a port from a connector with
SourcePortID/TargetPortID alongside the owning node's id
in SourceID/TargetID.
Constructors
Port()
Initializes a new instance of the Port class.
Declaration
public Port()
Fields
IdProperty
Identifies the Id bindable property.
Declaration
public static readonly BindableProperty IdProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
StyleProperty
Identifies the Style bindable property.
Declaration
public static readonly BindableProperty StyleProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
VisibilityProperty
Identifies the Visibility bindable property.
Declaration
public static readonly BindableProperty VisibilityProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Properties
Id
Gets or sets the port's identifier. Assigned automatically when left null. Referenced by SourcePortID/TargetPortID.
Declaration
public string Id { get; set; }
Property Value
| Type |
|---|
| System.String |
Style
Gets or sets the port glyph's fill/stroke appearance.
Declaration
public ShapeStyle Style { get; set; }
Property Value
| Type |
|---|
| ShapeStyle |
Visibility
Gets or sets when this port is actually drawn. Defaults to Visible — EJ2's own library default of Connect (drawn only while a connector drag is happening nearby) otherwise makes a newly-added port look like it never rendered at all.
Declaration
public PortVisibility Visibility { get; set; }
Property Value
| Type |
|---|
| PortVisibility |