C# Class ESRI.ArcGIS.Client.Toolkit.ScaleLine

Inheritance: System.Windows.Controls.Control, INotifyPropertyChanged
Show file Open project: Esri/arcgis-toolkit-sl-wpf Class Usage Examples

Public Properties

Property Type Description
MapProperty System.Windows.DependencyProperty
MapUnitProperty System.Windows.DependencyProperty
TargetWidthProperty System.Windows.DependencyProperty

Public Methods

Method Description
OnApplyTemplate ( ) : void

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call M:System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application.

Private Methods

Method Description
GetBestEstimateOfValue ( double resolution, ScaleLineUnit displayUnit, ScaleLineUnit &unit, double &outResolution ) : double
GetResolutionForGeographic ( MapPoint center, double resolution ) : double

Calculates horizontal scale at center of extent for geographic / Plate Carrée projection. Horizontal scale is 0 at the poles.

InitializeMapUnit ( ) : void

Try to initialize the map units

Map_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void
OnMapPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnMapPropertyChanged ( Map oldMap, Map newMap ) : void
OnMapUnitPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnPropertyChanged ( string propertyName ) : void
OnTargetWidthPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
RefreshScaleline ( ) : void

Refreshes the scaleline when the map extent changes.

RoundToSignificant ( double value, double resolution ) : double

Rounds to a value to the significant number of digits.

ScaleLine ( ) : System

Static initialization for the ScaleLine control.

SetDesignValues ( ) : void

Sets the design values.

map_ExtentChanged ( object sender, ExtentEventArgs args ) : void

Handles the ExtentChanged and ExtentChanging event of the map control.

Method Details

OnApplyTemplate() public method

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call M:System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application.
public OnApplyTemplate ( ) : void
return void

Property Details

MapProperty public static property

Identifies the Map dependency property.
public static DependencyProperty,System.Windows MapProperty
return System.Windows.DependencyProperty

MapUnitProperty public static property

Identifies the MapUnit dependency property.
public static DependencyProperty,System.Windows MapUnitProperty
return System.Windows.DependencyProperty

TargetWidthProperty public static property

Identifies the TargetWidth dependency property.
public static DependencyProperty,System.Windows TargetWidthProperty
return System.Windows.DependencyProperty