Back to Devexpress

ArrowSettings.StartArrowheadType Property

officefileapi-devexpress-dot-spreadsheet-dot-arrowsettings.md

latest4.8 KB
Original Source

ArrowSettings.StartArrowheadType Property

Gets or sets the type of an arrowhead at the beginning of a connector.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
ArrowheadType StartArrowheadType { get; set; }
vb
Property StartArrowheadType As ArrowheadType

Property Value

TypeDescription
ArrowheadType

One of the ArrowheadType enumeration values indicating the start arrowhead type.

|

Available values:

NameDescriptionExample
None

A connector has no arrowhead at the specified end.

| | | Triangle |

A triangular arrowhead.

|

| | Open |

An open arrowhead.

|

| | Stealth |

A stealth-shaped arrowhead.

|

| | Diamond |

A diamond-shaped arrowhead.

|

| | Oval |

An oval-shaped arrowhead.

|

|

Property Paths

You can access this nested property as listed below:

Object TypePath to StartArrowheadType
ConnectorFormat

.Arrows .StartArrowheadType

|

Remarks

Specify the arrowhead’s size using the ArrowSettings.StartArrowheadLength and ArrowSettings.StartArrowheadWidth properties.

Example

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.

csharp
// 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);
vb
' 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

ArrowSettings Interface

ArrowSettings Members

DevExpress.Spreadsheet Namespace