windowsforms-devexpress-dot-xtramap-dot-beforemeasurementeventargs-2a37c43f.md
Returns style settings of the new ruler.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public MapRulerStyle Style { get; set; }
Public Property Style As MapRulerStyle
| Type | Description |
|---|---|
| MapRulerStyle |
Style settings of the new ruler.
|
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;
}
Private Sub Measurements_BeforeMeasurement(ByVal sender As Object, ByVal e As BeforeMeasurementEventArgs)
e.Style.Stroke = Color.Gray
e.Style.StrokeWidth = 4
End Sub
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
BeforeMeasurementEventArgs Class