title: windows phone 8 map not displaying in user control
body: <p>I want to implement an 'attach location' feature in my application.
  I've decided to create a user control and put my map in it, then upon a certain button click I show this control in a full screen popup/custom message box.</p>
  
  <p>The problem is that everything works fine except that the map is simply not being displayed; I can retrieve my location, put pushpins, zooming seems working(despite the fact that I'm not seeing anything!). </p>
  
  <p>Whats more weird is that the same code copied and pasted to a phone application page works fine and map appears. I don't understand, is this a limitation that I don't know of?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>    &lt;UserControl
         .....
          xmlns:maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
          mc:Ignorable="d"
       ....
      &gt;
  &lt;Grid x:Name="LayoutRoot" Background="Black"&gt;
  
          &lt;Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"&gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition Height="Auto"/&gt;
                  &lt;RowDefinition Height="Auto"/&gt;
                  &lt;RowDefinition Height="*"/&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;maps:Map Mode="AerialWithLabels"  
                      Grid.Row="0" 
                      Height="300" 
                      HorizontalAlignment="Left" 
                      Name="map1" VerticalAlignment="Top" 
                      Width="460" Margin="-12,0,0,0"&gt;
              &lt;/maps:Map&gt;
              &lt;Button Content="share location" 
                      Name="btn_SendLocation" 
                      IsEnabled="False" 
                      Grid.Row="1" 
                      Click="Button_Click_1"/&gt;
              &lt;ListBox Grid.Row="2" 
                       Name="lst_NearBy" 
                       DataContext="{Binding Location}" 
                       Tap="lst_NearBy_Tap"&gt;
                  &lt;ListBox.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;StackPanel Margin="0,5"&gt;
                              &lt;TextBlock Text="{Binding mName}" Style="{StaticResource PhoneTextLargeStyle}"/&gt;
                              &lt;TextBlock Text="{Binding mVicinity}" Margin="10,0,0,0" Foreground="Gray"/&gt;
                          &lt;/StackPanel&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ListBox.ItemTemplate&gt;
              &lt;/ListBox&gt;
          &lt;/Grid&gt;
      &lt;/Grid&gt;
  </code></pre>