While we're at it, let's add a scale bar to our map so that users can get a sense of distances:
MainWindow.xaml
, add the following after the legend code:<toolkit:ScaleLine Scale="{Binding ElementName=MyMapView, Path=Scale}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="10" />
Make sure to zoom in and out and you'll note that it changes, depending on the scale of the map. Once again, ScaleLine
has a property called Scale
, which binds to the Scale
property of MapView
. As we discussed in Chapter 4, From 2D to 3D, there is no such thing as scale in 3D, so this control won't work in SceneView
.