|
Themes and Skins:A skin describes how a control should look like. Skins can represent the stylesheet attributes, properties etc., Themes are nothing but collection of skins. We can have multiple themes and this enables the easier switch between one look and feel to another with not much work behind. These themes are maintained in a separate special folder called Themes. You can direct your page to make use of a certain theme using the page directive as below. <%@ page theme="MildTheme" %> We can define the skins that a particular control should use in the themes called a skin file.The skin file is in /Themes/MildThemeThis is done as follows.<asp:Button skinid="ButtonSkin" Font-Italic=True Font-Bold=True BackColor=LemonChiffon/>
<asp:Button id="Button1" skinid="ButtonSkin" runat="server" Text="Button"></asp:Button>
Types of themes: There are two types of themes: 1. Customization themes 2. Style sheet themes Customization themes: The properties on this theme are applied after any properties defined in the control. Hence these themes notionally wins. These are mainly used for customization purposes Style sheet themes: The properties on this theme are applied before any properties defined in the control. Hence the properties defined in the control play the key role in the appearance of the control. These are used to define the reusable properties among the controls and to override them based on the individual control needs. The order in which the properties to the control are applied is as follows: Style sheet Themes Properties defined in the control Customization themes The structure of the themes folder will be something like this Themes Default1 Skin1.skin Skin2.skin Default 2 Skin1.skin Skin2.skin
| ||||||||||||||||||||||