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

BeforeMeasurementEventArgs.Style Property

Returns style settings of the new ruler.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

public MapRulerStyle Style { get; set; }

#Property Value

Type Description
MapRulerStyle

Style settings of the new ruler.

#Remarks

The following example changes the ruler’s outline color and width:

private void Measurements_BeforeMeasurement(object sender, BeforeMeasurementEventArgs e) {
  e.Style.Stroke = Color.Gray;
  e.Style.StrokeWidth = 4; 
}

The Map Control uses style settings from the Measurements.Style property for options that you do not define in the e.Style property. In the example above, the e.Style.AreaTransparency property is not set, so the Measurements.Style.AreaTransparency value is applied to the newly created ruler.

Additionally, if the Measurements.Style property is not set, the default ruler’s style settings are used.

See Also