Back to Devexpress

MapLine Class

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

latest3.4 KB
Original Source

MapLine Class

Contains map line settings.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public class MapLine :
    MapShape,
    ISupportCoordPoints,
    ISupportIntermediatePoints,
    IEditableItem,
    IMapLineCore,
    ISupportRenderLineCap,
    ISupportMarkerElements
vb
Public Class MapLine
    Inherits MapShape
    Implements ISupportCoordPoints,
               ISupportIntermediatePoints,
               IEditableItem,
               IMapLineCore,
               ISupportRenderLineCap,
               ISupportMarkerElements

The following members return MapLine objects:

Remarks

Create a Map Line

The following example creates a map line:

xaml
<dxm:MapLine Point1="-40, -90" Point2="-50, -70"/>

View Example

Add Map Line Caps

You can display shapes at the beginning and at the end of map lines. Use the StartLineCap and EndLineCap properties for this purpose.

The following example specifies a custom end cap shape, shows the default arrow for the MapLine start cap, and sets their dimensions:

xaml
<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" Length="30" Width="15"/>
  </dxm:MapLine.StartLineCap>
  <dxm:MapLine.EndLineCap>
    <dxm:MapLineCap Visible="True" Length="30" Width="15">
      <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:MapLine.EndLineCap>
</dxm:MapLine>

Implements

IColorizerElement

IEditableItem

Inheritance

Object DispatcherObject DependencyObject Freezable MapDependencyObject MapItem MapShapeBase MapShape MapLine

See Also

MapLine Members

Set Map Shape Coordinates to Cross the 180th Meridian

DevExpress.Xpf.Map Namespace