Skip to main content
All docs
V24.2

Measurements.AfterMeasurement Event

Occurs after a user creates a ruler.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

Declaration

[Browsable(false)]
public event AfterMeasurementEventHandler AfterMeasurement

Event Data

The AfterMeasurement event's data class is AfterMeasurementEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
MapRuler Returns a newly created map ruler.

Remarks

The Measurements object raises the AfterMeasurement event after a user creates a ruler. Use the e.MapRuler property to get a new ruler. To cancel ruler creation, set the e.Cancel property to true.

The following example cancels area ruler creation:

private void Measurements_AfterMeasurement(object sender, AfterMeasurementEventArgs e) {
  MapRuler ruler1 = e.MapRuler;
  if (ruler1.RulerType == RulerType.Area) {
      e.Cancel = true;
  }
}
See Also