Jaime Rodriguez On Windows Phone, Windows Presentation Foundation, Silverlight and Windows 7
A theme is a visual definition of the look & feel for common controls in an Operating System. Themes are usually end-user selectable, changing the theme at the OS level, impacts the look & feel of running applications that are ‘theme aware’. As an example, on Windows Vista and Windows 7, a popular/desired theme is the Aero theme.
Windows Phone supports theming. Here is a screenshot of the themes in action in Windows Phone.
This is the exact same app. No code changes, and no recompile. I switched the OS themes to get the different look and feel.
Since theming is new to Silverlight, I went under the hood for the implementation details, below are my findings (when dissecting the MIX Preview release). Note: This is pre-released preview software, it will definitely change [I will point a few coming changes, and I am sure there will be more than I know about now] .
Details on how end-users will configure themes:
Developer/implementation details:
A known issues at MIX release:
There is a bug in the MIX preview release that makes resource resolution behave different from what I described above. The bug is that {StaticResource} lookups are looking at the “themed resources” collection first instead of looking at application resources first. This is a bug and will be fixed in later builds.
Note that this is not a big issue, you would only see this issue if your themed resources, and your application resources do not match. There is two scenarios when this can happen:
Sample code is at http://learningwindowsphone.com/samples/LearningWindowsPhone.ThemesAtMIX.zip
That is it all you should need to know to get going with themes. Now, you can plan for your Windows Phone application to be theme-aware.
Wow. Nice and fantastic themes.