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

Categories

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *