All docs
V20.2
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.

MeasurementCreateMode Class

A measurement mode that allows users to create rulers.

Namespace: DevExpress.Xpf.Map

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

Declaration

public class MeasurementCreateMode :
    MeasurementModeBase
Public Class MeasurementCreateMode
    Inherits MeasurementModeBase

Remarks

In this mode, users can click the map to create a ruler. They do not need to click the Measurements toolbar buttons.

The following markup activates the Measurements object's Create mode for the distance ruler:

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

Specify the RulerType property to change the ruler type:

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

Use the SetCreateModeCommand to activate Create mode at runtime.

You can also specify the Measurements.Mode property in code as follows:

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

The code above allows users to add an area ruler.

See Also