PortPlacementHelper.PositionChildPort Method
Auto place port shape.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
'宣告
Public Overridable Sub PositionChildPort ( _
portShape As Port, _
parentShape As NodeShape _
)
public virtual void PositionChildPort(
Port portShape,
NodeShape parentShape
)
public:
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
)
Parameters
- portShape
Type: Microsoft.VisualStudio.Modeling.Diagrams.Port
- parentShape
Type: Microsoft.VisualStudio.Modeling.Diagrams.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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.