Skip to main content
All docs
V21.2

MapLine.StartLineCap Property

Specifies MapLine start cap settings.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v21.2.dll

Declaration

public MapLineCap StartLineCap { get; set; }

Property Value

Type Description
MapLineCap

Contains MapLine start cap settings.

Remarks

Display the Default Arrow

Use the StartLineCap property to display a shape at the beginning of a map line. The default cap shape is an arrow. Set the Visible property to true to display the arrow:

<dxm:VectorLayer x:Name="vectorLayer">
    <dxm:MapItemStorage>
        <dxm:MapLine Point1="-3, -10" Point2="-10, -28"  Stroke="Blue">
            <dxm:MapLine.StrokeStyle>
                <dxm:StrokeStyle Thickness="2"/>
            </dxm:MapLine.StrokeStyle>
            <dxm:MapLine.StartLineCap>
                <dxm:MapLineCap Visible="True"/>
            </dxm:MapLine.StartLineCap>
        </dxm:MapLine>
    </dxm:MapItemStorage>
</dxm:VectorLayer>

Result:

Display MapLine start cap

Display a Custom Shape

To display a custom shape, set the MapLineCap.Geometry property to the PathGeometry object that defines a cap shape.

Use the MapLineCap.Width and MapLineCap.Length properties to specify dimensions of the default arrow or a custom shape.

The following example defines a custom start cap shape and its dimensions:

<dxm:MapLine.StartLineCap>
    <dxm:MapLineCap  Visible="True" Length="25" Width="15">
        <dxm:MapLineCap.Geometry>
            <PathGeometry Figures="M-0.38,-0.5 L 0.44,-0.05 C 0.44,-0.05 0.5,0 0.44,0.05 
                                   L 0.44,0.05 L -0.38,0.5 C -0.38,0.5 -0.44,0.5 -0.41,0.4 L -0.41,0.4 
                                   L -0.13,0 L -0.41,-0.4 C -0.41,-0.4 -0.44,-0.475 -0.38,-0.5 Z"/>
        </dxm:MapLineCap.Geometry>
    </dxm:MapLineCap>
</dxm:MapLine.StartLineCap>

Result:

Display MapLine custom start cap shape

See Also