Back to Devexpress

MeasurementCreateMode Class

wpf-devexpress-dot-xpf-dot-map-6a15ca79.md

latest2.8 KB
Original Source

MeasurementCreateMode Class

A measurement mode that allows users to create rulers.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public class MeasurementCreateMode :
    MeasurementModeBase
vb
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:

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

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

csharp
MeasurementCreateMode mode = new MeasurementCreateMode();
mode.RulerType = RulerType.Area;
mapControl1.Measurements.Mode = mode;
vb
Dim mode As MeasurementCreateMode = New MeasurementCreateMode()
mode.RulerType = RulerType.Area
mapControl1.Measurements.Mode = mode

The code above allows users to add an area ruler.

Inheritance

Object DispatcherObject DependencyObject Freezable MapDependencyObject MeasurementModeBase MeasurementCreateMode

See Also

MeasurementCreateMode Members

DevExpress.Xpf.Map Namespace