All docs
V21.2
21.2
21.1
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Measurements.Mode Property

Gets or sets the mode that the Measurements object uses.

Namespace: DevExpress.Xpf.Map

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

Declaration

public MeasurementModeBase Mode { get; set; }

Property Value

Type Description
MeasurementModeBase

The mode that the Measurements object uses.

Remarks

You can set this property to Create or Edit mode.

Create Mode

In Create mode, users click the map to create a ruler. They do not need to click the Measurements toolbar buttons. Assign the MeasurementCreateMode object to the Mode property to activate this mode. Use the RulerType property to specify the ruler type.

In XAML:

<dxm:MapControl.Measurements>
    <dxm:Measurements>
        <dxm:Measurements.Mode>
             <dxm:MeasurementCreateMode RulerType="Area"/>
        </dxm:Measurements.Mode>
    </dxm:Measurements>
</dxm:MapControl.Measurements>

In code:

MeasurementCreateMode mode = new MeasurementCreateMode();
mode.RulerType = RulerType.Area;
mapControl1.Measurements.Mode = mode;

Edit Mode

Edit mode allows users to change map rulers. To activate this mode, set the Mode property to the MeasurementEditMode object.

In XAML:

<dxm:MapControl.Measurements>
  <dxm:Measurements>
      <dxm:Measurements.Mode>
          <dxm:MeasurementEditMode/>
      </dxm:Measurements.Mode>
  </dxm:Measurements>
</dxm:MapControl.Measurements>

In code:

mapControl1.Measurements.Mode = new MeasurementEditMode();

The following actions are available in Edit mode:

Action

Description

Add a ruler point.

Click the position on the ruler where you wish to add a point.

Change the ruler polyline.

Click and drag the point to a new location.

Delete a ruler point.

Double-click the ruler point.

The image below shows how to change a distance ruler:

Edit Ruler

See Also