I am working on a windows 8 app using C# and XAML. The app has a maps page which has custom pushpins. I added the custom pushpin using the following code:
<Style x:Key="PushPinStyle" TargetType="bm:Pushpin">
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="39"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Image Source="Assets/pushpin_icon.png" Stretch="Uniform" HorizontalAlignment="Left"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Once I enable the above code the pushpins don't show up unless the map is moved by user. The following code is used to generate the map. DataTemplate-
<DataTemplate x:Key="pushpinSelector" >
<bm:Pushpin Tapped="pushpinTapped" Style="{StaticResource PushPinStyle}">
<bm:MapLayer.Position >
<bm:Location Latitude="{Binding Latitude}" Longitude="{Binding Longitude}"/>
</bm:MapLayer.Position>
</bm:Pushpin>
</DataTemplate>
Maps XAML-
<bm:Map.Children>
<bm:MapItemsControl Name="pushPinModelsLayer"
ItemsSource="{Binding Results}"
ItemTemplate="{StaticResource pushpinSelector}" />
</bm:Map.Children>
</bm:Map>
Once I remove the custom style for the Pushpin the default pushpin show up correctly without needing to move the map. I would like the cutom pushpins show up similarly without needing manually moving the map. Thanks for the solution in advance.