Please look at this related thread: http://forums.arcgis.com/threads/15157-Access-ScaleBars-Current-Value Post #4, you can update this style.
You could change the scalebar displayunit when the map extent changes.Something like (to adapt from your map units and the expected scalebar units): void Map_ExtentChanged(object sender, ExtentEventArgs e) { ScaleBarUnit scaleBarUnit; double width = e.NewExtent.Width; if (width < 10) scaleBarUnit = ScaleBarUnit.Centimeters; else if (width > 100000) scaleBarUnit = ScaleBarUnit.Kilometers; else scaleBarUnit = ScaleBarUnit.Meters; myScaleBar.DisplayUnit = scaleBarUnit; }and XAML <esri:Map x:Name="Map" ExtentChanged="Map_ExtentChanged">
void Map_ExtentChanged(object sender, ExtentEventArgs e) { ScaleBarUnit scaleBarUnit; double width = e.NewExtent.Width; if (width < 10) scaleBarUnit = ScaleBarUnit.Centimeters; else if (width > 100000) scaleBarUnit = ScaleBarUnit.Kilometers; else scaleBarUnit = ScaleBarUnit.Meters; myScaleBar.DisplayUnit = scaleBarUnit; }
<esri:Map x:Name="Map" ExtentChanged="Map_ExtentChanged">
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.