Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 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.XtraMap

    Assembly: DevExpress.XtraMap.v25.1.dll

    NuGet Package: DevExpress.Win.Map

    #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