Changes to Theme Resources in Windows Phone 8.1

On Windows Phone we have the choice to set our theme to either Light or Dark – this will affect all apps and on top of that we also have the Accent Color to personalize our device even more. Windows 8.1 on the other side hasn’t themes or Accent Color but as the platforms converge we get same API on both platforms – but with slightly different behavior.


We couldn’t force our Windows Phone 8 app out of the box to only use the light theme but PhoneThemeManager made it possible. A single line of code and the app was forced into light theme. Though AppBars required some extra code and MessageBoxes wasn’t themed at all it worked really well.

Then came Windows Phone 8.1

With a single line of code in XAML we can force the app to a theme we want without additional code or hacks.

<Application x:Class="App2.App"

In this example it’s done in app.xaml which sets the theme to light across the app. But we are not limited to only set this property in app.xaml but we can also do it on any page or even on any FrameworkElement.

Accent Color

By changing accent color the user can get a feel of a more personalized device, and using this color in your app may enhance this feeling. In Windows Phone 8.0 we could do this with:

Background="{StaticResource PhoneAccentBrush}"

In Windows Phone 8.1 we got a new type of accentcolor resource:

Background="{ThemeResource SystemColorControlAccentColor}"

This also works in Windows 8.1 apps so that it’s possible to share XAML in universal apps and still take advantage of accent color. But since accent color doesn’t exist on Windows 8.1 the color we get will always be Blueberry.

No more restarts

Another new feature that comes with Windows Phone 8.1 is that the need to restart the app after changing theme is gone if you are using ThemeResource in your bindings. So changing accent color or theme will take effect immediately which is really cool.


Happy coding! 🙂


Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:


Stai commentando usando il tuo account Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.