Skins for Server Controls
As the name suggests, skins serve as outer covers of controls. Most out-of-the box ASP.NET server controls support skins. Nevertheless, it's always a good idea to check if the control you plan to work with can be skinned. To do so, look for the SkinID
property. If the control has a SkinID
property, you can apply a skin to it.
There are two types of skins:
Default skins, which are applied to all controls that do not have a corresponding skin defined in the
SkinID
. For example, if you define a default skin for aTextBox
control, allTextBox
controls on pages that adopt the theme will follow the styles defined in the default skin.Name-controlled skins, which target only controls that share the same
SkinID
. For instance, you may have a skin for aTextBox
defined. Suppose the skin has theSkinID
ofMyTextBox
. OnlyTextBox
controls that have a matchingSkinID
ofMyTextBox
will have the skin applied.
Creating a Default Skin
Consider the case of the SiteMapPath
control...