C# Class ESRI.ArcGIS.SilverlightMapApp.ScaleBar

Inheritance: System.Windows.Controls.Control
Mostra file Open project: Esri/arcgis-templates-silverlight Class Usage Examples

Public Properties

Property Type Description
FillProperty System.Windows.DependencyProperty
MapProperty 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.

ScaleBar ( ) : System

Initializes a new instance of the ScaleBar class.

Private Methods

Method Description
GetBestEstimateOfValue ( double resolution, ScaleBarUnit displayUnit, ScaleBarUnit &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.

OnMapPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
RefreshScalebar ( ) : void

Refreshes the scalebar when the map extent changes.

RoundToSignificant ( double value, double resolution ) : double

Rounds to a value to the significant number of digits.

getBestEstimateOfValue ( double resolution, ESRI displayUnit, ESRI &unit, double &outResolution ) : double
getResolutionForGeographic ( ESRI extent, double resolution ) : double
map_ExtentChanged ( object sender, ESRI args ) : void

Handles the ExtentChanged and ExtentChanging event of the map control.

refreshScalebar ( ) : void
roundToSignificant ( double value, double resolution ) : double

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

ScaleBar() public method

Initializes a new instance of the ScaleBar class.
public ScaleBar ( ) : System
return System

Property Details

FillProperty public_oe static_oe property

Identifies the Fill dependency property.
public static DependencyProperty,System.Windows FillProperty
return System.Windows.DependencyProperty

MapProperty public_oe static_oe property

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

TargetWidthProperty public_oe static_oe property

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