Note: This API is now obsolete. Please use the ScaleLine control in the ESRI.ArcGIS.Client.Toolkit namespace.
Gets or sets the width of the ScaleBar Control.
| Visual Basic (Declaration) | |
|---|---|
Public Property TargetWidth As Double | |
| C# | |
|---|---|
public double TargetWidth {get; set;} | |
| XAML | Copy Code |
|---|---|
<esri:ScaleBar Name="ScaleBar1" Map="{Binding ElementName=Map1}" TargetWidth="300" /> | |
| C# | Copy Code |
|---|---|
//The ScaleBar Control (named ScaleBar1) was define previously in the code...
ScaleBar1.TargetWidth = 300; | |
| VB.NET | Copy Code |
|---|---|
'The ScaleBar Control (named ScaleBar1) was define previously in the code...
ScaleBar1.TargetWidth = 300 | |
The TargetWidth of the ScaleBar Control is the total width of the graphic bars on Control; not the single individual alternating sub-bars. It is the entire horizintal width of the graphic bar portion of the ScaleBar that matches the text on the ScaleBar for a particular zoom level.
The actual width of the ScaleBar changes when values are rounded.
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family