Skip to main content
All docs

MeasurementCreateMode Class

A measurement mode that allows users to create rulers.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map


public class MeasurementCreateMode :


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:


Specify the RulerType property to change the ruler type:

      <dxm:MeasurementCreateMode RulerType="Area"/>

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