Using Themes and Skins for Personalization with Visual Basic 2005 - Using Named Skins (Page 4 of 7 )
You can override the theme for particular controls by using named skins.
Set the lblRadioButtonListlabel to be red even in the Deep Blue theme, by using a named skin. To accomplish this, create two Label skins in the Label.skin file within the Deep Blue folder.
<asp:Label Runat="server"
ForeColor="Blue" Font-Size="Large"
Font-Bold="True" Font-Italic="True" />
<asp:Label Runat="server" SkinID="Red"
ForeColor="Red" Font-Size="Large"
Font-Bold="True" Font-Italic="True" />
The first skin is the default; the second is a named skin, because it has aSkinIDproperty set toRed. Click on theRadioButtonListcontrol in Design view and set theSkinIDproperty toRed. Or, open the source for Welcome.aspx and find theRadioButtonListand add the attributeSkinID="Red":
<asp:Label ID="lblRadioButtonList" Runat="server" Text="Radio Button List"
SkinID="Red"/>
When you log in and set your theme to Dark Blue, you’ll find that the label for theRadioButtonListisRed, as shown in Figure 12-49. (You didn’t get stuck with a black & white book, did you?)

Figure 12-49. RadioButtonList label is Red
Next: Web Parts >>
More Visual Basic.NET Articles
More By O'Reilly Media
|
This article is excerpted from chapter 12 of the book Programming Visual Basic 2005, written by Jesse Liberty (O'Reilly, 2005; ISBN: 0596009496). Check it out today at your favorite bookstore. Buy this book now.
|
|