Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Even though this thread is a little bit old I'm going to post my suggestion:</p> <p>Try out this link <a href="http://msdn.microsoft.com/en-us/library/gg588383%28v=vs.92%29.aspx" rel="nofollow">Working with Pushpins</a>, it is working for me (create a new style and use it in pushpin declaration)</p> <p>(App.xaml, <strong>do not forget the namespace!</strong>)</p> <pre><code>xmlns:m="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps" &gt; &lt;Application.Resources&gt; &lt;Style TargetType="m:Pushpin" x:Key="PushpinStyle"&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="m:Pushpin"&gt; &lt;Image Width="24" Height="24" Source="path_to_pic" /&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre> <p></p> <p>(in the xaml there the map is)</p> <pre><code>&lt;Grid x:Name="LayoutRoot" Background="Transparent"&gt; &lt;m:Map x:Name="Map" Mode="Aerial" CredentialsProvider="CredKey"&gt; &lt;m:MapItemsControl x:Name="Content"&gt; &lt;m:MapItemsControl.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;m:Pushpin Location="{Binding Location}" Style="{StaticResource PushpinStyle}" /&gt; &lt;/DataTemplate&gt; &lt;/m:MapItemsControl.ItemTemplate&gt; &lt;/m:MapItemsControl&gt; &lt;/m:Map&gt; &lt;/Grid&gt; </code></pre> <p>If this isn't working check if the Build Action of your picture is set to content.</p> <p>Took me a while to figure this out, so i hope i could help someone, despite the fact that this thread is old. ;)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload