Compartir a través de


PortPlacementHelper.PositionChildPort(Port, NodeShape) Method

Definition

Auto place port shape.

public:
 virtual void PositionChildPort(Microsoft::VisualStudio::Modeling::Diagrams::Port ^ portShape, Microsoft::VisualStudio::Modeling::Diagrams::NodeShape ^ parentShape);
public virtual void PositionChildPort (Microsoft.VisualStudio.Modeling.Diagrams.Port portShape, Microsoft.VisualStudio.Modeling.Diagrams.NodeShape parentShape);
abstract member PositionChildPort : Microsoft.VisualStudio.Modeling.Diagrams.Port * Microsoft.VisualStudio.Modeling.Diagrams.NodeShape -> unit
override this.PositionChildPort : Microsoft.VisualStudio.Modeling.Diagrams.Port * Microsoft.VisualStudio.Modeling.Diagrams.NodeShape -> unit
Public Overridable Sub PositionChildPort (portShape As Port, parentShape As NodeShape)

Parameters

portShape
Port
parentShape
NodeShape

Remarks

Derived classes can override this to specialize placement behavior.

By default: 1. A port is positioned on the left vertical edge beneath any existing ports. 2. It then goes counter clockwise around the shape, until it finds an empty space. 3. If multiple ports are added in a single action these should be distributed in the available space. 4. If it requires the height of the component shape needs to be increased to accommodate the newly added ports.

Applies to