MeasurementCreateMode Class
A measurement mode that allows users to create rulers.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v24.2.dll
NuGet Package: DevExpress.Wpf.Map
Declaration
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.
Inheritance
See Also