PortPlacementHelper.PositionChildPort Method

Auto place port shape.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)


Public Overridable Sub PositionChildPort ( _
    portShape As Port, _
    parentShape As NodeShape _
public virtual void PositionChildPort(
    Port portShape,
    NodeShape parentShape
virtual void PositionChildPort(
    Port^ portShape, 
    NodeShape^ parentShape
abstract PositionChildPort : 
        portShape:Port * 
        parentShape:NodeShape -> unit  
override PositionChildPort : 
        portShape:Port * 
        parentShape:NodeShape -> unit
public function PositionChildPort(
    portShape : Port, 
    parentShape : NodeShape



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.

.NET Framework Security

See Also


PortPlacementHelper Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace