The theme is similar to css, but it can provide some features that css cannot provide
------------------Theme is based on controls rather than HTML (theme allows for fixed sum and reuse of almost all attributes)
-----------------Theme application on the server
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------Themes will not overlap like CSS (if a theme and space are defined at the same time, the definition of the theme will overwrite the properties of the control, of course this can also be modified)
The controls in the theme cannot define ID
Simple example
1. Website---Add new items---Appearance file (suffix name .skin)--Select "Yes" will create an App_Themes\skinName (the folder of your theme name)
Then set the style of the control you want to set in the file, such as:
<%--
Preset panel template. The following panels are only for example purposes.
1. Named Control Panel. SkinId should be the only definition because in the same subject, a control item type cannot have a duplicate SkinId.
[code]
<asp:GridView runat="server" SkinId="gridviewSkin" BackColor="White" >
<AlternatingRowStyle BackColor="Blue" />
</asp:GridView>
2. Preset panel. SkinId Not defined. In the same topic, each control type can only have one default control panel.
<asp:Image runat="server" ImageUrl="~/images/" />
--%>
<asp:TextBox runat="server" SkinId="test" width="20" />
[/code]
Then use this theme on the page such as: Theme="The name of your theme"
<%@ Page Language="C#" AutoEventWireup="true" CodeFile=""
Inherits="Test22.WebForm1" Theme="TestBox" %>
This is how it is used when using the control SkinID=""SkinID you set"
<asp:TextBox ID="TextBox1" SkinID="test" runat="server"></asp:TextBox>
If neither file is added with SkinID, this theme will be applied to all corresponding controls on the interface
------------------Theme is based on controls rather than HTML (theme allows for fixed sum and reuse of almost all attributes)
-----------------Theme application on the server
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------Themes will not overlap like CSS (if a theme and space are defined at the same time, the definition of the theme will overwrite the properties of the control, of course this can also be modified)
The controls in the theme cannot define ID
Simple example
1. Website---Add new items---Appearance file (suffix name .skin)--Select "Yes" will create an App_Themes\skinName (the folder of your theme name)
Then set the style of the control you want to set in the file, such as:
Copy the codeThe code is as follows:
<%--
Preset panel template. The following panels are only for example purposes.
1. Named Control Panel. SkinId should be the only definition because in the same subject, a control item type cannot have a duplicate SkinId.
[code]
<asp:GridView runat="server" SkinId="gridviewSkin" BackColor="White" >
<AlternatingRowStyle BackColor="Blue" />
</asp:GridView>
2. Preset panel. SkinId Not defined. In the same topic, each control type can only have one default control panel.
<asp:Image runat="server" ImageUrl="~/images/" />
--%>
<asp:TextBox runat="server" SkinId="test" width="20" />
[/code]
Then use this theme on the page such as: Theme="The name of your theme"
Copy the codeThe code is as follows:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile=""
Inherits="Test22.WebForm1" Theme="TestBox" %>
This is how it is used when using the control SkinID=""SkinID you set"
Copy the codeThe code is as follows:
<asp:TextBox ID="TextBox1" SkinID="test" runat="server"></asp:TextBox>
If neither file is added with SkinID, this theme will be applied to all corresponding controls on the interface