<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomTree.aspx.cs" Inherits="CustomTree" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
   <title>Custom TreeView</title>
   <link href="chapterStyles.css" type="text/css" rel="stylesheet"/>
   <style type="text/css">
      h2 { background-color: #A6B4DB; width: 200px; padding: 4px; }
      .tree { width: 200px; padding: 4px;}
   </style>
</head>
<body>
   <form id="form1" runat="server">
   <div id="container">
      <h1>Custom TreeView Control</h1>
      <p>This example illustrates using a custom <code>ImageSet</code> with the <code>TreeView</code> control</p>

      <h2>Custom Tree</h2>      
      <asp:TreeView ID="treeMain" runat="server" DataSourceID="siteSource" 
        CssClass="tree" ImageSet="Custom" NodeIndent="15"  
        CollapseImageUrl="images/iconCollapse.gif" 
        ExpandImageUrl="images/iconExpand.gif"
        NoExpandImageUrl="images/iconPage.gif" ShowLines="True" >
         
         <NodeStyle NodeSpacing="2px" ChildNodesPadding="6px"
            HorizontalPadding="4px" />
         <RootNodeStyle HorizontalPadding="15px" VerticalPadding="5px"
           BorderStyle="Solid" BorderWidth="1px" BorderColor="#ACB9B9"/>

      </asp:TreeView>

      <asp:SiteMapDataSource ID="siteSource" runat="server" 
         ShowStartingNode="true"  />
   </div>
   </form>
</body>
</html>
