A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in a Web application, across an entire Web application, or across all Web applications on a server.
What is Themes?
A theme is a collection of property
settings that allow you to define the look of pages and controls, and then
apply the look consistently across pages in a Web application, across an entire
Web application, or across all Web applications on a server.
Themes
are made up of a set of elements: skins, cascading style sheets (CSS), images,
and other resources. At a minimum, a theme will contain skins. Themes are
defined in special directories in your Web site or on your Web server.
Skins
A
skin file has the file name extension .skin and contains property settings for
individual controls such as Button, Label, TextBox, or Calendar controls.
Control skin settings are like the control markup itself, but contain only the
properties you want to set as part of the theme. For example, the following is
a control skin for a Button control:
<asp:button runat="server" BackColor="lightblue" ForeColor="black" />
You
create .skin files in the Theme folder. A .skin file can contain one or more
control skins for one or more control types. You can define skins in a separate
file for each control or define all the skins for a theme in a single file.
There
are two types of control skins, default skins and named
skins:
·
A default skin automatically applies to all controls of the same
type when a theme is applied to a page. A control skin is a default skin if it
does not have a SkinID attribute.
For example, if you create a default skin for a Calendar control,
the control skin applies to allCalendar controls
on pages that use the theme. (Default skins are matched exactly by control
type, so that a Button control
skin applies to all Button controls,
but not to LinkButton controls
or to controls that derive from the Button object.)
·
A named skin is a control skin with a SkinID property
set. Named skins do not automatically apply to controls by type. Instead, you
explicitly apply a named skin to a control by setting the control'sSkinID property.
Creating named skins allows you to set different skins for different instances
of the same control in an application.
·
Cascading Style
Sheets
A
theme can also include a cascading style sheet (.css file). When you put a .css
file in the theme folder, the style sheet is applied automatically as part of
the theme. You define a style sheet using the file name extension .css in the
theme folder.
No comments:
Post a Comment