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

Advertisements

One thought on “Get Windows Phone 7 Theme Background Colour

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s