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

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.

Syntax

Visual Basic (Declaration) 
Public Property TargetWidth As Double
C# 
public double TargetWidth {get; set;}

Example

XAMLCopy 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.NETCopy Code
'The ScaleBar Control (named ScaleBar1) was define previously in the code...
ScaleBar1.TargetWidth = 300

Remarks

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.

Example of the Scalebar TargetWidth.

The actual width of the ScaleBar changes when values are rounded.

Requirements

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

See Also

© ESRI, Inc. All Rights Reserved.