WindowsPhoneGeek

WPAppInfo

Login | Join (Why?)

rss rss rss
logo

WP7 – Changing Visuals Based on Phone Theme with ThemeToStateBehavior

1/30/2012

source: dotneteers.net

The built-in resources in Windows Phone 7 help a lot with  automatically reflecting the selected theme of the phone. (See my earlier blog post: Being theme aware in Windows Phone 7 Silverlight apps). However, sometimes you want to be theme aware, but need more than the predefined resources. For example, you may want to have a generally blue background color, but want it to be a dark blue for the dark theme, and a light blue for the light theme. I created a little Behavior that allows you to do just this.

Here is how to use it:

  • Create a new WP7 application (or use your existing one)
  • Create a new Visual State Group with two Visual States in Expression Blend. Name them however you want, but I like to keep a naming convention for my states:

...Read more

You can also follow us on Twitter @winphonegeek

Comments

Add comment to 'WP7 – Changing Visuals Based on Phone Theme with ThemeToStateBehavior'

Comment

New! WindowsPhoneGeek Component Marketplace

Our Top Articles & Free books

Our Top Tips & Samples