Get Windows Phone 7 Theme Background Colour

To get the Background Colour in Windows Phone 7 as selected by the user, you need to use the following 2 lines of code:

PhoneApplicatonPage pap = new PhoneApplicationPage();

pap.Resources["PhoneBackgroundColor"]).ToString();

To check whether the theme is dark or light, maybe for the foreground colours to use, you need to check using the next if statement:

if ((pap.Resources["PhoneBackgroundColor"]).ToString() == "#FFFFFFFF")

For the foreground color check this post

References from here

Hello, nice to meet you

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Leave a Reply