C# Class Esri.ArcGISRuntime.Toolkit.Controls.ScaleLine

Inheritance: Control
Show file Open project: Esri/arcgis-toolkit-dotnet

Public Properties

Property Type Description
ScaleProperty DependencyProperty
TargetWidthProperty DependencyProperty

Public Methods

Method Description
OnApplyTemplate ( ) : void
ScaleLine ( ) : Esri.ArcGISRuntime.Geometry

Initializes a new instance of the ScaleLine class.

Protected Methods

Method Description
OnApplyTemplate ( ) : void

Private Methods

Method Description
GetFoot ( ) : double

1. (target_width_pixels / 96) = target_width_inches 2. target_width_inches * map_scale = map_scale_inches 3. map_scale_inches converted to feet = map_scale_feet

GetKilometer ( ) : double

1. (target_width_pixels / 96) = target_width_inches 2. target_width_inches * map_scale = map_scale_inches 3. map_scale_inches converted to kilometers = map_scale_kilometers

GetMeter ( ) : double

1. (target_width_pixels / 96) = target_width_inches 2. target_width_inches * map_scale = map_scale_inches 3. map_scale_inches converted to meters = map_scale_meters

GetMile ( ) : double

1. (target_width_pixels / 96) = target_width_inches 2. target_width_inches * map_scale = map_scale_inches 3. map_scale_inches converted to miles = map_scale_miles

GetRoundedValue ( double value ) : double
OnScalePropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

The property changed event that is raised when the value of Scale property changes.

OnTargetWidthPropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

The property changed event that is raised when the value of TargetWidth property changes.

Refresh ( ) : void

Refreshes the scaleline when the map extent changes.

SetMetricUnit ( double value, string unit ) : void

Sets the metric units section of the scale line

SetUsUnit ( double value, string unit ) : void

Sets the imperial units section of the scale line

Method Details

OnApplyTemplate() protected public method

protected public OnApplyTemplate ( ) : void
return void

ScaleLine() public method

Initializes a new instance of the ScaleLine class.
public ScaleLine ( ) : Esri.ArcGISRuntime.Geometry
return Esri.ArcGISRuntime.Geometry

Property Details

ScaleProperty public static property

The dependency property for the Scale property.
public static DependencyProperty ScaleProperty
return DependencyProperty

TargetWidthProperty public static property

The dependency property for the TargetWidth property.
public static DependencyProperty TargetWidthProperty
return DependencyProperty