Show Coordinates
This sample demonstrates the show coordinates behavior, which attaches a display of the current mouse coordinates to the mouse cursor. Move the mouse over the map and you will see that coordinates are displayed next to the mouse cursor.The sample XAML shows that using this behavior only requires declaring it within a Map element and specifying a format string to define how the coordinates should be displayed.
Download Sample Application<UserControl x:Class="ArcGISWPFSDK.LocalShowCoordinatesBehavior" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"> <Grid x:Name="LayoutRoot" > <esri:Map x:Name="MyMap" WrapAround="True" Extent="-15000000,2000000,-7000000,8000000" MinimumResolution="2445.98490512499"> <esri:ArcGISLocalTiledLayer ID="Shaded Relief" Path="..\\Data\\TPKs\\Topographic.tpk"/> <i:Interaction.Behaviors> <esri:ShowCoordinatesBehavior FormatString="{}{0:0.00} , {1:0.00}"/> </i:Interaction.Behaviors> </esri:Map> </Grid> </UserControl>
5/16/2014