officefileapi-devexpress-dot-spreadsheet-dot-connectorformat-dot-connectstartpoint-x28-devexpress-dot-spreadsheet-dot-shape-system-dot-int32-x29.md
Attaches the connector’s start point to the drawing object.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
void ConnectStartPoint(
Shape connectedShape,
int connectionSite
)
Sub ConnectStartPoint(
connectedShape As Shape,
connectionSite As Integer
)
| Name | Type | Description |
|---|---|---|
| connectedShape | Shape |
A Shape object that is a drawing object to connect to.
| | connectionSite | Int32 |
An integer that is the index number of a shapes’ connection site to which the connector should be attached.
|
Check the drawing object’s connection sites number using the ShapeGeometry.ConnectionSiteCount property. The connection sites’ index number starts from 0 and grows as you move counterclockwise.
The code sample below shows how to insert a shape connector, provide it with arrows, change the outline color and attach it to shapes. Both ends are connected to the third connection site of each shape.
// Insert a shape connector.
Shape shapeConnector = worksheet.Shapes.AddConnector(ConnectorType.Curved, 10, 10, 100, 100);
// Adjust the connector's outline.
shapeConnector.Outline.SetSolidFill(Color.Black);
shapeConnector.Outline.Width = 2.5;
// Convert the connector's ends into arrows.
ConnectorFormat connectorFormat = shapeConnector.ConnectorFormat;
connectorFormat.Arrows.StartArrowheadType = ArrowheadType.Stealth;
connectorFormat.Arrows.StartArrowheadWidth = ArrowheadSize.Large;
connectorFormat.Arrows.StartArrowheadLength = ArrowheadSize.Large;
connectorFormat.Arrows.EndArrowheadType = ArrowheadType.Stealth;
connectorFormat.Arrows.EndArrowheadWidth = ArrowheadSize.Large;
connectorFormat.Arrows.EndArrowheadLength = ArrowheadSize.Large;
// Bind the connector to two shapes.
connectorFormat.ConnectStartPoint(shape1, 3);
connectorFormat.ConnectEndPoint(shape2, 3);
' Insert a shape connector.
Dim shapeConnector As Shape = worksheet.Shapes.AddConnector(ConnectorType.Curved, 10, 10, 100, 100)
' Adjust the connector's outline.
shapeConnector.Outline.SetSolidFill(Color.Black)
shapeConnector.Outline.Width = 2.5
' Convert the connector's ends into arrows.
Dim connectorFormat As ConnectorFormat = shapeConnector.ConnectorFormat
connectorFormat.Arrows.StartArrowheadType = ArrowheadType.Stealth
connectorFormat.Arrows.StartArrowheadWidth = ArrowheadSize.Large
connectorFormat.Arrows.StartArrowheadLength = ArrowheadSize.Large
connectorFormat.Arrows.EndArrowheadType = ArrowheadType.Stealth
connectorFormat.Arrows.EndArrowheadWidth = ArrowheadSize.Large
connectorFormat.Arrows.EndArrowheadLength = ArrowheadSize.Large
' Bind the connector to two shapes.
connectorFormat.ConnectStartPoint(shape1, 3)
connectorFormat.ConnectEndPoint(shape2, 3)
See Also