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.
Visual Basic (Declaration) | |
---|---|
Public Function New() |
C# | |
---|---|
public ScaleBar() |
XAML | Copy 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.NET | Copy 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 |
Target Platforms:Windows Phone 7