title: Windows Phone 8 Change Accent and Theme Colour
body: <p>I am creating an Application for Windows Phone 8, and I would like to change the theme colour irrespective of the theme set by the user in the phone OS, in the same way that other applications do this (for example Skype).</p>
  
  <p>So far I have only managed to change the background colour, by accessing the LayoutRoot element in XAML:</p>
  
  <pre><code>this.LayoutRoot.Background = new SolidColorBrush(Colors.White);
  </code></pre>
  
  <p>And the Foreground Colour:</p>
  
  <pre><code>(App.Current.Resources["PhoneForegroundBrush"] as SolidColorBrush).Color = Colors.Green;
  </code></pre>
  
  <p>However the following does not work on Windows Phone 8:</p>
  
  <pre><code>(App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush).Color = Colors.White;
  (App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush).Color = Colors.Yellow;
  </code></pre>
  
  <p>I do not know why I cannot change the <code>PhoneBackgroundBrush</code> or the <code>PhoneAccentBrush</code> and I have tried googling solutions however they only work with the windows phone 7 SDK.The Tutorial <a href="http://www.identitymine.com/forward/2010/11/theming-tips-for-windows-phone-7-wp7/" rel="noreferrer">here</a> works on WP 7 but not WP 8.</p>
  
  <p>Thank you!</p>