Select to view content in your preferred language

MapScale

430
1
01-12-2012 12:52 AM
MarcoRosa
Emerging Contributor
Hi to all,
using this sample code of Map Scale we have a number unformatted like this 1234655,56786567

<TextBlock Name="MapScaleTextBlock" HorizontalAlignment="Center" VerticalAlignment="Bottom" >
   <Run>Scala Mappa:</Run>
   <Run Text="{Binding ElementName=Map, Path=Scale }" FontSize="12" FontWeight="Bold" />
</TextBlock>

I would like to rapresent the map scale formatted and rounded like this 1:400.000
Any suggestion about this ?

Thank you veru much

GP
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
With the StringFormat property of the Binding, you can use any number format.

For example:
{Binding ElementName=MyMap, Path=Scale, StringFormat='1:{0:N0}'}
0 Kudos