Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

MapPolyline Class

Contains map polyline settings.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

#Declaration

public class MapPolyline :
    MapPolylineBase

The following members return MapPolyline objects:

#Remarks

#Create a Map Polyline

The following example creates a map polyline:

MapPolyline

<dxm:MapPolyline>
    <dxm:MapPolyline.Points>
        <dxm:GeoPoint>0, 0</dxm:GeoPoint>
        <dxm:GeoPoint>-20, -10</dxm:GeoPoint>
        <dxm:GeoPoint>-10, -20</dxm:GeoPoint>
    </dxm:MapPolyline.Points>
</dxm:MapPolyline>

View Example

#Add Polyline Caps

You can display shapes at the beginning and at the end of map polylines. Use StartLineCap and EndLineCap properties for this purpose. The following example specifies a custom end cap shape, shows the default arrow for the MapPolyline start cap, and sets their dimensions:

Map Polyline Caps

<dxm:MapPolyline Stroke="Blue">
   <dxm:MapPolyline.StrokeStyle>
       <dxm:StrokeStyle Thickness="2"/>
   </dxm:MapPolyline.StrokeStyle>
   <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.StartLineCap>
       <dxm:MapLineCap Visible="True" Length="15" Width="8"/>
   </dxm:MapPolyline.StartLineCap>
   <dxm:MapPolyline.EndLineCap>
       <dxm:MapLineCap  Visible="True" Length="10" Width="5">
           <dxm:MapLineCap.Geometry>
               <PathGeometry Figures="M 0, 0 L 0,-0.5 L 0.5,-0.5 L 0.5, 0.5 L 0,0.5 Z "/>
           </dxm:MapLineCap.Geometry>
       </dxm:MapLineCap>
   </dxm:MapPolyline.EndLineCap>
</dxm:MapPolyline>
See Also