Measurements.CreateRuler(RulerType, IList<CoordPoint>, RulerAppearance) Method
Creates a ruler with the specified type and appearance settings to measure the distance or the area between coordinate points passed as the second parameter.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v24.1.dll
NuGet Package: DevExpress.Wpf.Map
Declaration
public MapRuler CreateRuler(
RulerType rulerType,
IList<CoordPoint> points,
RulerAppearance rulerAppearance
)
Parameters
Name | Type | Description |
---|---|---|
rulerType | RulerType | The type of the created ruler. |
points | IList<CoordPoint> | Coordinate points between which the ruler measures the distance or area. |
rulerAppearance | RulerAppearance | The appearance settings. |
Returns
Type | Description |
---|---|
MapRuler | The created ruler. |
Remarks
Use an instance of the RulerAppearance class to define appearance options.
The following example changes the ruler’s color and width:
RulerAppearance style = new RulerAppearance();
style.Stroke= Brushes.DarkRed;
style.Fill = Brushes.Red;
style.StrokeStyle = new StrokeStyle() { Thickness = 3};
MapRuler ruler = mapControl1.Measurements.CreateRuler(RulerType.Distance,
new List<CoordPoint>(){
new GeoPoint(48.864716, 2.349014), // Paris
new GeoPoint(45.46427, 9.18951), // Milan
new GeoPoint(48.20849, 16.37208) }, // Vienna
style);
See Also