title: Change image based on Theme selection for Light or Dark
body: <p>I'am creating a Windows Phone 8.1 app in which I use a number of images that should be shown according to the selected Theme Light or Dark.</p>
  
  <p>The Light and Dark image are created with the correct naming and scaling.</p>
  
  <p>I've created the following ThemeResource to set the Image Source according to the selected Theme.</p>
  
  <p></p>
  
  <pre><code>&lt;ResourceDictionary&gt;
      &lt;ResourceDictionary.ThemeDictionaries&gt;
          &lt;ResourceDictionary x:Key="Light"&gt;
              &lt;Style x:Key="ShowImage" TargetType="Image"&gt;
                  &lt;Setter Property="Source" Value="Assets/image.png"/&gt;                            
              &lt;/Style&gt;
          &lt;/ResourceDictionary&gt;
          &lt;ResourceDictionary x:Key="Dark"&gt;
              &lt;Style x:Key="ShowImage" TargetType="Image"&gt;
                  &lt;Setter Property="Source" value="Assets/image.png"/&gt;
              &lt;/Style&gt;
          &lt;/ResourceDictionary&gt;                
      &lt;/ResourceDictionary.ThemeDictionaries&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p></p>
  
  <p>And the XAML to show the Image as necessary.</p>
  
  <pre><code>&lt;Grid&gt;        
      &lt;Image HorizontalAlignment="Center" 
             VerticalAlignment="Center" 
             Stretch="None" 
             Style="{ThemeResource ShowImage}"&gt;
      &lt;/Image&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>When I start the app with a theme selected the correct image is shown every time. However when I select a different theme and then switch back to my app I can see that the background color is updated however my image is not updated dynamically.</p>
  
  <p>As far as I'am aware the ThemeResource should be used to update this dynamically but I can't get it to work. 
  Does anybody know what is wrong with my XAML code?</p>