Page

ASP.NET - How to enable, disable theme in Panel, EnableTheming property

//PanelEnableTheming.aspx

<%@ Page Language="C#" Theme="PanelEnableThemingTest" %>  
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  
<script runat="server">  
      
</script>  
  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title>How to enable, disable theme in Panel, EnableTheming property</title>  
</head>  
<body>  
    <form id="form1" runat="server">  
    <div>  
        <h2 style="color:Navy; font-style:italic;">Panel Example: EnableTheming</h2>  
        <asp:Panel   
             ID="Panel1"  
             runat="server"  
             EnableTheming="true"  
             >  
             <br />  
             Panel EnableTheming: True  
        </asp:Panel>  
        <br />  
        <asp:Panel   
             ID="Panel2"  
             runat="server"  
             Height="150"  
             Width="350"  
             BorderColor="Gray"  
             BorderWidth="1"  
             EnableTheming="false"  
             >  
             <br />  
             Panel EnableTheming: False  
        </asp:Panel>  
    </div>  
    </form>  
</body>  
</html>  

//PanelEnableThemingTest.skin

<asp:Panel   
     runat="server"  
     BackColor="Wheat"  
     ForeColor="DeepPink"  
     Font-Bold="true"  
     BorderColor="OrangeRed"  
     BorderWidth="2"  
     Font-Size="X-Large"  
     Font-Italic="true"  
     Height="150"  
     Width="350"  
     HorizontalAlign="Center"  
     >  
</asp:Panel>  

No comments:

Post a Comment