//TreeViewTheme.aspx
<%@ Page Language="C#" Theme="TreeView" %>
<!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 use theme and skin in TreeView</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:Navy">TreeView Example: Theme and Skin</h2>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
<asp:TreeView
ID="TreeView1"
runat="server"
DataSourceID="SiteMapDataSource1"
>
</asp:TreeView>
</div>
</form>
</body>
</html>
//TreeView.skin
<asp:TreeView
runat="server"
BackColor="SteelBlue"
ForeColor="AliceBlue"
BorderWidth="2"
BorderColor="DarkBlue"
Width="275"
>
<RootNodeStyle Font-Bold="true" Font-Size="Large" />
<ParentNodeStyle Font-Bold="true" />
<LeafNodeStyle Font-Italic="true" Font-Underline="true" />
<HoverNodeStyle
BackColor="Crimson"
ForeColor="LightGoldenrodYellow"
Font-Size="X-Large"
/>
</asp:TreeView>
//Web.sitemap
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="Home Page">
<siteMapNode url="StandardToolBox.aspx" title="StandardToolBox" description="StandardToolBox Controls">
<siteMapNode url="AdRotatorExample.aspx" title="AdRotator" description="AdRotator Example" />
<siteMapNode url="BulletedListExample.aspx" title="BulletedList" description="BuulletedList Example" />
<siteMapNode url="ButtonExample.aspx" title="Button" description="Button Example" />
<siteMapNode url="CalendarExample.aspx" title="Calendar" description="Calendar Example" />
</siteMapNode>
<siteMapNode url="DataToolBox.aspx" title="DataToolBox" description="DataToolBox controls">
<siteMapNode url="ListViewExample.aspx" title="ListView" description="ListView Example" />
<siteMapNode url="GridViewExample.aspx" title="GridView" description="GridView Example" />
</siteMapNode>
<siteMapNode url="NavigationToolbox.aspx" title="Navigation Toolbox" description="NavigationToolbox controls">
<siteMapNode url="MenuExample.aspx" title="Menu" description="Menu Example" />
<siteMapNode url="SiteMapPathExample.aspx" title="SiteMapPath" description="SiteMapPath Example" />
<siteMapNode url="TreeViewExample.aspx" title="TreeView" description="TreeView Example" />
</siteMapNode>
</siteMapNode>
</siteMap>
No comments:
Post a Comment