| « Silverlight 3 Tutorial on Moveable background/terrain | Silverlight 3D wiki » |
ASP Theming
Well, seems i have come to the realization to keep me from typing various properties to my ASP code controls before i deal with the codebehind, i will have to implement a Theme (StyleSheetTheme or Theme) for the site i am getting ready to bring to the 21st Century.
In this venture i have run across various explanations but not many of them actually represent and explain very well the utility of the Theme and how to layer the different theme-styles into a website.
As such, i am going to lay-down a very cut-throat explanation to try and keep it to the point without doing an experts view explanation of the fact.
Theme-Styles
- StyleSheetTheme [web.config] (First Interpretation)
- Page [html source] (Second Interpretation)
- Theme [page directive] (Third & Final Interpretation)
This is the first theme-style to be interpreted by the server. As such, the only styles this overrides are the defaults set by the control objects being rendered.
This the second theme-style to be interpreted by the server. This is the most common, as you actively set properties & design through the page source (html source: asp, aspx, etc). This does not include source editing of the control styles. This is the point blank, design properties of a control before you start playing with the data being displayed.
This the third, and final, theme-style to be interpreted by the server. This is usually defined page by page, or user selectable, for further customization and/or flair.
All in all, if you had the desire and energy (basically need) to design a site using the theme system. It would be my suggestion to follow this hierarchy of design:
StyleSheetTheme (web.config) -> Page-level (html source) -> Theme (page directive)
As well, when using this hierarchy, follow this flow for use:
- StyleSheetTheme: use this to specify site specific properties that are unique to the site but are used all over the site and its various pages. As such, remember this is a global type theme, and as such all local property settings (Page-level & Theme) override these settings.
- Page-level: use this to specify specific control properties that are unique to this page only. If they can be categorized to other similar controls across the site then look at putting them in either a Theme or StyleSheetTheme. Remember that a Theme will override any properties set here.
- Theme: use this to specify page specific control designs but are only specific to the page specified. If the properties can be set to multiple pages, then look at putting them to the StyleSheetTheme.
References used to compile this:
Vimodi's blog
MSDN Themes & Skins explained