Back to Devexpress

Measurements.AreaUnits Property

wpf-devexpress-dot-xpf-dot-map-dot-measurements-a4f05dbf.md

latest3.0 KB
Original Source

Measurements.AreaUnits Property

Gets or sets the measurement unit for an area ruler.

Namespace : DevExpress.Xpf.Map

Assembly : DevExpress.Xpf.Map.v25.2.dll

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public AreaMeasurementUnit AreaUnits { get; set; }
vb
Public Property AreaUnits As AreaMeasurementUnit

Property Value

TypeDescription
AreaMeasurementUnit

An area measurement unit.

|

Remarks

You can use the following values:

To apply the area unit to the ruler, specify the unit before you create the ruler. The following code creates a ruler that measures the area in square miles:

csharp
mapControl1.Measurements.AreaUnits = AreaMeasureUnit.SquareMile;
MapRuler ruler= mapControl1.Measurements.CreateRuler(RulerType.Area, new List<CoordPoint>() {
                                                                                  new GeoPoint(0, 0),
                                                                                  new GeoPoint(10, 0),
                                                                                  new GeoPoint(10, 10) });
vb
mapControl1.Measurements.AreaUnits = AreaMeasureUnit.SquareMile
Dim ruler As MapRuler = mapControl1.Measurements.CreateRuler(RulerType.Area, 
                                                              New List(Of CoordPoint)() From {
                                                                            New GeoPoint(0, 0),
                                                                            New GeoPoint(10, 0),
                                                                            New GeoPoint(10, 10)})

See Also

DistanceUnits

Measurements Class

Measurements Members

DevExpress.Xpf.Map Namespace