Skip to main content
All docs
V21.2

Measurements.AfterMeasurement Event

Occurs after a user creates a ruler.

Namespace: DevExpress.Xpf.Map

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

Declaration

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 the created ruler.

Remarks

The Measurements object raises the AfterMeasurement event after a user creates a ruler. To get the new ruler, use the e.MapRuler property. 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