Show / Hide Table of Contents

Class ScaleLine

The ScaleLine Control generates a line representing a certain distance on the map in both Metric and US units.

Inheritance
Object
ScaleLine
Namespace: Esri.ArcGISRuntime.Toolkit.UI.Controls
Assembly: Esri.ArcGISRuntime.Toolkit.WinUI.dll
Syntax
public class ScaleLine : Control

Constructors

| Improve this Doc View Source

ScaleLine()

Initializes a new instance of the ScaleLine class.

Declaration
public ScaleLine()

Fields

| Improve this Doc View Source

MapScaleProperty

The dependency property for the Scale property.

Declaration
public static readonly DependencyProperty MapScaleProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

MapViewProperty

Identifies the Dependency Property.

Declaration
public static readonly DependencyProperty MapViewProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

TargetWidthProperty

Identifies the dependency property for the TargetWidth property.

Declaration
public static readonly DependencyProperty TargetWidthProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

MapScale

Declaration
public double MapScale { get; set; }
Property Value
Type Description
Double
See Also
MapViewProperty
| Improve this Doc View Source

MapView

Gets or sets the MapView property that can be attached to a Scaleline control to accurately set the scale, instead of setting the MapScale property directly.

Declaration
public MapView? MapView { get; set; }
Property Value
Type Description
Nullable<MapView>
| Improve this Doc View Source

TargetWidth

Gets or sets the width that will be used to calculate the length of the ScaleLine.

Declaration
public double TargetWidth { get; set; }
Property Value
Type Description
Double

Methods

| Improve this Doc View Source

CalculateScale(Nullable<Geometry.Polygon>, Double)

Calculates the scale at the center of a polygon, at a given pixel size.

Declaration
public static double CalculateScale(Geometry.Polygon? visibleArea, double unitsPerPixel)
Parameters
Type Name Description
Nullable<Geometry.Polygon> visibleArea

The area which center the scale will be calculated for.

Double unitsPerPixel

The size of a device indepedent pixel in the units of the spatial reference.

Returns
Type Description
Double

The MapScale for the center of the view.

Remarks

A pixel is a device independent logical pixel - ie 1/96 inches.

| Improve this Doc View Source

OnApplyTemplate()

Declaration
protected override void OnApplyTemplate()
| Improve this Doc View Source

OnCreateAutomationPeer()

Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type Description
AutomationPeer
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX