Have you tried the interactive SDK that Microsoft provides? It helps me.
It seems you only need to place the MapLayer and place the Pushpin controls in Pushpin . You use the attached MapLayer.Position property to bind something to this map layer to the map; so when the user moves the map, she says. This attached property is of type Location , which is a type that is the property of the Bing Map control, which contains both the longitude (double) and the Latitude (double) value. If you need to associate a collection of specified locations, you can use the MapItemsControl inside MapLayer to associate your ItemsSource property with your collections. You can also create a data template; just remember that your template root should use the MapLayer.Position property to indicate its location on the map. This can be associated with any Location value.
<UserControl x:Class="MapControlInteractiveSdk.Tutorials.DataBinding.TutorialMapItemsControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:t="clr-namespace:MapControlInteractiveSdk.Tutorials.DataBinding" xmlns:m="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl"> <UserControl.Resources> <DataTemplate x:Key="LogoTemplate"> <m:Pushpin m:MapLayer.Position="{Binding Location}" /> </DataTemplate> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <m:Map CredentialsProvider="Your Key"> <m:MapLayer> <m:MapItemsControl x:Name="ListOfItems" ItemTemplate="{StaticResource LogoTemplate}" ItemsSource="{Binding MyLocalizedEntities}"> </m:MapItemsControl> </m:MapLayer> <m:MapLayer> </m:MapLayer> </m:Map> </Grid> </UserControl>
source share