Back to Devexpress

BeforeMeasurementEventArgs.Style Property

windowsforms-devexpress-dot-xtramap-dot-beforemeasurementeventargs-2a37c43f.md

latest2.1 KB
Original Source

BeforeMeasurementEventArgs.Style Property

Returns style settings of the new ruler.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public MapRulerStyle Style { get; set; }
vb
Public Property Style As MapRulerStyle

Property Value

TypeDescription
MapRulerStyle

Style settings of the new ruler.

|

Remarks

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

csharp
private void Measurements_BeforeMeasurement(object sender, BeforeMeasurementEventArgs e) {
  e.Style.Stroke = Color.Gray;
  e.Style.StrokeWidth = 4; 
}
vb
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

BeforeMeasurementEventArgs Members

DevExpress.XtraMap Namespace