Class PointPort
Defines the behavior of a port (connection point) that sticks to a point.
Inherited Members
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
Implements
System.ICloneable