MapPolylineBase.EndLineCap Property
Specifies 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 end cap settings. |
Remarks
Display the Default Arrow
Use the EndLineCap property to display a shape at the end of a MapPolylineBase descendant. 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:MapPolyline Stroke="Blue">
<dxm:MapPolyline.StrokeStyle>
<dxm:StrokeStyle Thickness="2"/>
</dxm:MapPolyline.StrokeStyle>
<dxm:MapPolyline.EndLineCap >
<dxm:MapLineCap Visible="True" />
</dxm:MapPolyline.EndLineCap>
<dxm:MapPolyline.Points>
<dxm:GeoPoint>-6, -4</dxm:GeoPoint>
<dxm:GeoPoint>-3, -10</dxm:GeoPoint>
<dxm:GeoPoint>-6, -20</dxm:GeoPoint>
</dxm:MapPolyline.Points>
</dxm:MapPolyline>
<dxm:MapSpline Stroke="Blue">
<dxm:MapSpline.EndLineCap>
<dxm:MapLineCap Visible="True" />
</dxm:MapSpline.EndLineCap>
<dxm:MapSpline.StrokeStyle>
<dxm:StrokeStyle Thickness="2"/>
</dxm:MapSpline.StrokeStyle>
<dxm:MapSpline.Points>
<dxm:GeoPoint>-11, -4</dxm:GeoPoint>
<dxm:GeoPoint>-8, -10</dxm:GeoPoint>
<dxm:GeoPoint>-11, -20</dxm:GeoPoint>
</dxm:MapSpline.Points>
</dxm:MapSpline>
</dxm:MapItemStorage>
</dxm:VectorLayer>
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:
<Window.Resources>
<PathGeometry x:Key="CapShape" 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"/>
</Window.Resources>
<Grid>
<!--...-->
<dxm:MapPolyline Stroke="Blue">
<dxm:MapPolyline.EndLineCap>
<dxm:MapLineCap Visible="True" Length="18" Width="8" Geometry="{StaticResource CapShape}"/>
</dxm:MapPolyline.EndLineCap>
<!--...-->
</dxm:MapPolyline>
<dxm:MapSpline Stroke="Blue">
<dxm:MapSpline.EndLineCap>
<dxm:MapLineCap Visible="True" Length="10" Width="10" Geometry="{StaticResource CapShape}"/>
</dxm:MapSpline.EndLineCap>
<!--...-->
</dxm:MapSpline>
<!--...-->
</Grid>
Result:
See Also