title: WP7 Bing map in popup
body: <p>I'm working on a WP7 demo app and have gotten my popup working with <a href="https://stackoverflow.com/questions/3968322/wp7-popups-using-resources">static resources</a> wich I earlier had problems with. Now when this is out of the way i got a new bug wich regards my use of Bing Maps.</p>
  
  <p>When using bing maps in my default WP7 Silverlight pages (panorama or regual) the maps show up fine, but when using a bing map in my static resource layout the map itself is just showing up black.</p>
  
  <p>Controls around the map such as the navigation pane with zoom and map modes display fine and the bing map logo and distance reference line also show up fine but the map images is just plain black (transparent since the background of my popup is black).</p>
  
  <p>Anyone who encountered this before?</p>
  
  <p>I came up on post where this problem occured in the default silverlight pages (some signed assemblies bug) so I tried their fix with unsigned assemblies but then my WP7 app did not start.</p>
  
  <p>*Edit
  My popup resource XAML code looks like this.</p>
  
  <pre><code>&lt;ResourceDictionary xmlns:my="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl" 
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:Skanetrafiken.Controls;assembly=Skanetrafiken.Controls"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d"
      &gt;
      &lt;Style TargetType="local:MapRouteDialog"&gt;
          &lt;Setter Property="Background" Value="{StaticResource PhoneChromeBrush}"/&gt;
          &lt;Setter Property="Width" Value="480"/&gt;
          &lt;Setter Property="Height" Value="800"/&gt;
          &lt;Setter Property="Margin" Value="0"/&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="local:MapRouteDialog"&gt;
                      &lt;Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}" Margin="0, 0, 0, 0"&gt;
                          &lt;Grid.RowDefinitions&gt;
                              &lt;RowDefinition Height="Auto"/&gt;
                              &lt;RowDefinition Height="*"/&gt;
                          &lt;/Grid.RowDefinitions&gt;
  
                          &lt;!--TitlePanel contains the name of the application and page title--&gt;
                          &lt;StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,30,0,40"&gt;
                              &lt;TextBlock x:Name="DialogTitle" Text="MY DIALOG TITLE" Style="{StaticResource PhoneTextNormalStyle}"/&gt;
                          &lt;/StackPanel&gt;
                          &lt;my:Map x:Name="RouteMap" Grid.Row="1" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  NavigationVisibility="Visible"&gt;
                              &lt;Button x:Name="ButtonZoomIn" HorizontalAlignment="Left" VerticalAlignment="Top" Height="56" Width="56" Margin="8,180,0,0" BorderBrush="{x:Null}" Foreground="{x:Null}"&gt;
                                  &lt;Button.Background&gt;
                                      &lt;ImageBrush ImageSource="/Skanetrafiken.Controls;component/images/Zoom_In.png" /&gt;
                                  &lt;/Button.Background&gt;
                              &lt;/Button&gt;
                              &lt;Button x:Name="ButtonZoomOut" HorizontalAlignment="Left" VerticalAlignment="Top" Height="56" Width="56" Margin="8,260,0,0" BorderBrush="{x:Null}" Foreground="{x:Null}"&gt;
                                  &lt;Button.Background&gt;
                                      &lt;ImageBrush ImageSource="/Skanetrafiken.Controls;component/images/Zoom_Out.png" /&gt;
                                  &lt;/Button.Background&gt;
                              &lt;/Button&gt;
                              &lt;my:MapLayer Name="RouteLines"&gt;&lt;/my:MapLayer&gt;
                              &lt;my:MapItemsControl Name="PushPins"/&gt;
                          &lt;/my:Map&gt;
                      &lt;/Grid&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>no code needed for displaying a map, this xaml works in a standard silverlight WP7 page but not when used in resources like this. When used like this the map image/content will be missing and transparent.</p>