Mega Code Archive

 
Categories / ASP.Net Tutorial / Development
 

Disabling Themes

Use the EnableTheming property to prevent a Skin  from being applied. File: Simple\Calendar.skin <asp:Calendar     BackColor="White"     BorderColor="White"     BorderWidth="1px"     Font-Names="Verdana"     Font-Size="9pt"     ForeColor="Black"     NextPrevFormat="FullMonth"     Width="400px"     Runat="Server">     <SelectedDayStyle         BackColor="#333399"         ForeColor="White" />     <OtherMonthDayStyle         ForeColor="#999999" />     <TodayDayStyle         BackColor="#CCCCCC" />     <NextPrevStyle         Font-Bold="True"         Font-Size="8pt"         ForeColor="#333333"         VerticalAlign="Bottom" />     <DayHeaderStyle         Font-Bold="True"         Font-Size="8pt" />     <TitleStyle         BackColor="White"         BorderColor="Black"         BorderWidth="4px"         Font-Bold="True"         Font-Size="12pt"         ForeColor="#333399" /> </asp:Calendar> File: ShowEnableTheming.aspx <%@ Page Language="C#" Theme="Simple" %> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">     <title>Show EnableTheming</title> </head> <body>     <form id="form1" runat="server">     <div>     <asp:Calendar         id="Calendar1"         Runat="server" />     <br /><br />     <asp:Calendar         id="Calendar2"         EnableTheming="false"         Runat="server" />     </div>     </form> </body> </html>