MapLine.EndLineCap Property
Specifies MapLine end cap settings.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v24.2.dll
NuGet Package: DevExpress.Wpf.Map
Declaration
Property Value
Type | Description |
---|---|
MapLineCap | Contains MapLine end cap settings. |
Remarks
Display the Default Arrow
Use the EndLineCap property to display a shape at the end 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.EndLineCap>
<dxm:MapLineCap Visible="True"/>
</dxm:MapLine.EndLineCap>
</dxm:MapLine>
</dxm:MapItemStorage>
</dxm:VectorLayer>
Result:
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 end cap shape and its dimensions:
<dxm:MapLine.EndLineCap>
<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.EndLineCap>
Result:
See Also