Using Themes and Skins for Personalization with Visual Basic 2005 - Organize Site Themes and Skins (Page 2 of 7 )
Themes are stored in your project in a folder named App_Themes. To create this folder, go to Solution explorer, right-click on the project folder, and choose Add Folder -> Theme Folder. Name the new folder Dark Blue—the folder App_Themes will be created automatically, with a Theme folder named Dark Blue immediately under it. Right-click on App_Themes and create a second theme folder, named Psychedelic.
Right-click on the Dark Blue theme folder and choose Add New Item. From the template lists, choose Skin File and name it Button.skin (to hold all the button skins for your Dark Blue theme), as shown in figure Figure 12-46.

Figure 12-46. Creating the skin file
Each skin file is just a text file that contains a definition for the control type, but with no ID. Thus, your Label.skin file for the Dark Blue theme might look like this:
<asp:Label Runat="server"
ForeColor="Blue" Font-Size="Large"
Font-Bold="True" Font-Italic="True" />
Create skin files for each of the following types in both themes:
- Button.skin
- Calendar.skin
- Label.skin
- ListBox.skin
- RadioButton.skin
- Text.skin
At this point, your solution should look more or less like Figure 12-47.

Figure 12-47. Themes and skins in your project
You can experiment with adding attributes to these new skin files and see the effects they produce on your user interface. Start by copying the text from Label.skin, then modifying it so it affects the appropriate control type (asp:Buttonin Button.skin,asp:Calendarin Calendar.skin,asp:ListBoxin ListBox.skin, etc.).
Next: Enable Themes and Skins >>
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.
|
|