Class PointPort
Represents a behavior for a port (connection point) that sticks to a specific point on a node.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class PointPort : Port, IDiagramObject, ICloneable
Remarks
Ports serve as designated connection points on a node, facilitating precise connections. Multiple ports can exist on a single node, offering flexibility in customizing their appearance, visibility, and positioning. You can also add custom shapes to enhance their functionality.
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
Gets or sets a DiagramPoint that defines the position of the port.
Declaration
public DiagramPoint Offset { get; set; }
Property Value
Type | Description |
---|---|
DiagramPoint | A DiagramPoint representing the offset position of the port. No default value; initialized as empty. |
Remarks
Determines where the port appears on the node surface.
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 |