Reputation: 455
I want to bind my pushpins (which is a list ) to the My Map`s Maplayer.
There is no such thing "ItemSource" in MapLayers attributes. How can I bind my Pushpin List Data to MapLayer?
<my:Map HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="map1" CredentialsProvider="KEY" >
<my:Map.Children>
<my:MapLayer x:Name="pushPinMapLayer" ??Binding what???}">
</my:MapLayer>
</my:Map.Children>
</my:Map>
Upvotes: 1
Views: 808
Reputation: 2328
Please see the link below as it is from a question I asked a while back (which part of it should solve your question)
I think the part that will help you the most is the Xaml (in the Map>ItemsControl element)
<my:Map Height="520" HorizontalAlignment="Left" Margin="6,6,0,0" Name="map1" VerticalAlignment="Top" Width="468" ZoomBarVisibility="Collapsed" ZoomLevel="1" CredentialsProvider="{Binding bingMapsCredentials}" >
<my:MapLayer x:Name="myPushpinLayer">
<my:MapItemsControl Name="Pushpinsss" ItemTemplate="{StaticResource LogoTemplate}" ItemsSource="{Binding PushpinCollection}" >
</my:MapItemsControl>
</my:MapLayer>
</my:Map>
You need to add the MapItemsControl section under your MapLayer
Upvotes: 1