Arian Kulp's Blog
opinion, insight, and occasional code

Theming in Visual Web Developer/Expression

Friday, June 01, 2007 10:06 AM

So I've been frustrated that I just could not get a site's theme to show up at design time in either VWD or Expression Web.  As I looked at the Master Page and the individual pages, I couldn't see any sign of how the theme was even being applied, yet at runtime, it was clearly linked properly.  If I just added the stylesheet declaration to the Master Page all looked fine, but I didn't want to hack it.

Finally I came across this post from Steve Clements that explains how to add the <pages> element to the Web.config file to apply a style globally.  OK, I thought.  So that's how all the pages look good at runtime, but that post specifically gives that tip as a way to get the theme at design time.  Then I looked closer: the Small Business Web Site Starter Kit (that I was working with) uses:

<system.web>

  <pages theme="Standard" />

</system.web>

Looking at the theme folder, it's completely CSS-based.  I changed it as shown in the Steve's blog:

<system.web>

  <pages styleSheetTheme="Standard" />

</system.web>

What a difference!  Now it just magically works.  I still have more to learn about theming controls vs. stylesheets, but that was definitely a big step!

Comments have been closed on this topic.