Silverlight – Get the current theme at the time of the application – Windows Phone 7

I want to see what is the current theme in Windows Phone 7 so that I can change the text, image and color according to the current theme.

For example, If the current theme is yellow, I will change all the colors of the image to yellow.

you can use The following code accesses the current theme resources:

Application.Current.Resources[""]

The available theme resource names are listed in Here. The result of the above operation must be converted to the appropriate type; for example, if you want to get PhoneAccentBrush, you must cast the result to SolidColorBrush.

I want to see What is the current theme in Windows Phone 7 so that I can change the text, image and color according to the current theme.

For example, if the current theme is yellow, I will change all the colors of the image to Yellow.

You can use the following code to access the current theme resources:

Application.Current .Resources[""]

The available theme resource names are listed here. The result of the above operation must be converted to an appropriate type; for example, if you want to get PhoneAccentBrush, you must force the result Convert to SolidColorBrush.

Leave a Comment

Your email address will not be published.