The SkinID Property

Sometimes you wish to define a set of possible UI look and feels for a single widget. For example, assume you want to define two possible UIs for the Button type within the CrazyOrange theme. When you wish to do so, you may differentiate each look and feel using the SkinID property:

<asp:Button runat="server" BackColor="#FF8000"/> <asp:Button runat="server" SkinID = "BigFontButton" Font-Size="30pt" BackColor="#FF8000"/>

Now, if you have a page that makes use of the CrazyOrange theme, each Button will by default be assigned the unnamed Button skin. If you wish to have various buttons within the *.aspx file make use of the BigFontButton skin, simply specify the SkinID property within the markup:

<asp:Button ID="Button2" runat="server" SkinID="BigFontButton"

As an example, Figure 34-22 shows a page that is making use of the CrazyOrange theme. The topmost Button is assigned the unnamed Button skin, while the Button on the bottom of the page has been assigned the SkinID of BigFontButton.

Figure 34-22. Fun with SkinlDs
0 0

Post a comment

  • Receive news updates via email from this site