Cloud Training (Online)




Forcing the Theme for a Windows Phone 8 App

There are times when you app is designed for a specific theme say dark theme and you would have used Static Resources . When the user changes the theme to say “Light Theme” , the app might have an issue where something’s on the screen will become unreadable.

One possibility is to make sure that you app works fine on both the theme (Dark and Light) which might be a good idea . The other option is to force the app to appear in the specified theme .

How to Force the theme for a Windows Phone 8 App ?

Jeff Wilcox’s ‘Windows Phone Theme Manager 2.0’ can be used to force the theme for a Windows Phone App.

1. Install the Windows Phone Theme Manager by running the below command in the Package Manager Console

Install-Package PhoneThemeManager

2. In the App class constructor , set the desired theme . There are 2 methods available in the ThemeManager which you can use ToDarkTheme() and ToLightTheme();

ThemeManager.ToDarkTheme();

Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.