Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Measurements.AfterMeasurement Event

Occurs after a user creates a ruler.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

#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