Back to Devexpress

MapRulerStyle.AreaTransparency Property

windowsforms-devexpress-dot-xtramap-dot-maprulerstyle.md

latest3.6 KB
Original Source

MapRulerStyle.AreaTransparency Property

Gets or sets the area ruler transparency.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
[DefaultValue(-1)]
public int AreaTransparency { get; set; }
vb
<DefaultValue(-1)>
Public Property AreaTransparency As Integer

Property Value

TypeDefaultDescription
Int32-1

The value from 0 (opaque) to 255 (transparent).

|

Remarks

The following example creates an area ruler and changes the ruler’s fill color, transparency, outline color, and outline width:

csharp
MapRulerStyle rulerStyle = new MapRulerStyle();
rulerStyle.AreaTransparency = 170;
rulerStyle.Fill = Color.CornflowerBlue;
rulerStyle.Stroke = Color.DarkBlue;
rulerStyle.StrokeWidth = 3;
MapRuler ruler = mapControl1.Measurements.CreateRuler(RulerType.Area, 
                                                      new List<CoordPoint>() { new GeoPoint(10, 0), 
                                                                               new GeoPoint(20, 0),
                                                                               new GeoPoint(20, 10)}, 
                                                      rulerStyle);
vb
Dim rulerStyle As MapRulerStyle = New MapRulerStyle()
rulerStyle.AreaTransparency = 170
rulerStyle.Fill = Color.CornflowerBlue
rulerStyle.Stroke = Color.DarkBlue
rulerStyle.StrokeWidth = 3
Dim ruler As MapRuler = mapControl1.Measurements.CreateRuler(RulerType.Area, 
                                                             New List(Of CoordPoint)() From { New GeoPoint(10, 0),
                                                                                              New GeoPoint(20, 0),
                                                                                              New GeoPoint(20, 10)},
                                                             rulerStyle)

Related API members:

|

Name

|

Description

| | --- | --- | |

CreateRuler(RulerType, IList<CoordPoint>, MapRulerStyle)

|

Creates a ruler with the specified style.

| |

MapRulerStyle

|

Contains ruler style options.

| |

AreaTransparency

|

Gets or sets the area ruler’s transparency.

| |

Fill

|

Gets or sets the ruler’s fill color. The fill color is also used to draw the outline border of area rulers and distance ruler borders.

| |

Stroke

|

Gets or sets the ruler’s outline color.

| |

StrokeWidth

|

Gets or sets the ruler’s outline width.

|

See Also

MapRulerStyle Class

MapRulerStyle Members

DevExpress.XtraMap Namespace