Back to Devexpress

MapPolyline Class

wpf-devexpress-dot-xpf-dot-map-f79bb4fe.md

latest3.6 KB
Original Source

MapPolyline Class

Contains map polyline settings.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public class MapPolyline :
    MapPolylineBase
vb
Public Class MapPolyline
    Inherits MapPolylineBase

The following members return MapPolyline objects:

Remarks

Create a Map Polyline

The following example creates a map polyline:

xaml
<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:

xaml
<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>

Implements

IColorizerElement

IEditableItem

Inheritance

Object DispatcherObject DependencyObject Freezable MapDependencyObject MapItem MapShapeBase MapShape MapPolylineBase MapPolyline

See Also

MapPolyline Members

Set Map Shape Coordinates to Cross the 180th Meridian

DevExpress.Xpf.Map Namespace