ArcGIS API for WPF - Library Reference
ScaleBar Constructor
See Also  Example Send comments on this topic
ESRI.ArcGIS.Client Namespace > ScaleBar Class : ScaleBar Constructor

Note: This API is now obsolete. Please use the ScaleLine control in the ESRI.ArcGIS.Client.Toolkit namespace.

Initializes a new instance of the ScaleBar class.

Syntax

Visual Basic (Declaration) 
Public Function New()
C# 
public ScaleBar()

Example

XAMLCopy Code
<esri:ScaleBar Name="ScaleBar1" Map="{Binding ElementName=Map1} /esri:ScaleBar>
C#Copy Code
//Create a new ScaleBar Control and add it to the LayoutRoot (a Grid in the XAML)
ESRI.ArcGIS.Client.ScaleBar ScaleBar1 = new ESRI.ArcGIS.Client.ScaleBar();
LayoutRoot.Children.Add(ScaleBar1);
            
//Associate the ScaleBar with Map Control
ScaleBar1.Map = Map1;
VB.NETCopy Code
'Create a new ScaleBar Control and add it to the LayoutRoot (a Grid in the XAML)
   Dim ScaleBar1 As New ESRI.ArcGIS.Client.ScaleBar
   LayoutRoot.Children.Add(ScaleBar1)
            
   'Associate the ScaleBar with Map Control
   ScaleBar1.Map = Map1

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© ESRI, Inc. All Rights Reserved.