PortPlacementHelper::PositionChildPort Method (Port^, NodeShape^)

 

Auto place port shape.

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

public:
virtual void PositionChildPort(
	Port^ portShape,
	NodeShape^ parentShape
)

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.

Return to top
Show: