title: Windows 8 WinRT Xaml Grid inside InlineUIContainer
body: <p>In my Windows 8 ItemDetail view, I want to add an overlay image to the standard image which is contained inside an InlineUIContainer element.</p>
  
  <p>This is the xaml I am using:</p>
  
  <pre><code>&lt;Paragraph LineStackingStrategy="MaxHeight"&gt;
      &lt;InlineUIContainer&gt;
          &lt;Grid x:Name="MediaGrid" Width="560" Height="315" Margin="0,20,0,10"&gt;
              &lt;Grid.Background&gt;
                  &lt;ImageBrush ImageSource="{Binding Image}" Stretch="UniformToFill" /&gt;
              &lt;/Grid.Background&gt;
              &lt;Button Click="Button_Click" Background="Transparent" BorderBrush="Transparent" BorderThickness="0"&gt;
                  &lt;Button.Template&gt;
                      &lt;ControlTemplate TargetType="Button"&gt;
                          &lt;Image x:Name="OverlayImage" Visibility="{Binding ShowVideo, Converter={StaticResource booleanToVisibilityConverter}}" Source="ms-appx:///Assets/play-icon.png"/&gt;
                      &lt;/ControlTemplate&gt;
                  &lt;/Button.Template&gt;
              &lt;/Button&gt;
          &lt;/Grid&gt;
      &lt;/InlineUIContainer&gt;
  &lt;/Paragraph&gt;
  </code></pre>
  
  <p>This works perfectly when the app is in landscape mode. However as soon as I rotate, or open the app in portrait mode I receive the error:</p>
  
  <p><code>WinRT information: Cannot resolve TargetName image. Additional information: Unspecified error</code> in LayoutAwarePage.cs <code>VisualStateManager.GoToState(control, DetermineVisualState(ApplicationView.Value), false);</code></p>
  
  <p>Does anyone have any idea why? After a little process of elimination, it seems to happen when I have a Grid inside the InlineUIContainer.</p>