In order to create Theme for an application, first we need
to create a proper folder structure in application. Within the App_Themes
folder, we can create an additional Theme Folder for each and every Theme that
we might use in application. The reasons to use more than one Theme are because
seasons change, day/night changes, different business units, category of user,
user preferences, etc.
The elements of a Theme Folder can be as follows:
A Single skin file
Creating a Skin
A skin enables us to modify any of the properties applied to
the server controls in our ASP.NET page. Skins can work in conjunction with CSS
files or images. To create a Theme we can use a single skin file in the Theme
Folder. The skin file extension should be always .skin.
<asp:Label Runat=”server” ForeColor=”Red” Font-Names=”Verdana” Font-Size=”X-Small”/>
<asp:Textbox Runat=”server” ForeColor=”Red”
Font-Names=”Verdana” Font-Size=”X-Small” BorderStyle=”Solid” BorderWidth=”1px”
As the above example suggest, we need to define a definition
for style in respect of each server control in skin file in the application. We
can create different skin files in different Theme Folder.
<% Page Language=“C#” Theme =”myTheme” %>