Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET 4 Unleased - p 111

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

CHAPTER 22 Using the Navigation Controls . RootNodeStyle—Applied to root nodes (Tree nodes with no parent nodes). . SelectedNodeStyle—Applied to the selected node. For example, the page in Listing 22.30 uses several of these Style objects to format a TreeView control (see Figure 22.23). FIGURE 22.23 Using Styles with the TreeView control. LISTING 22.30 TreeViewStyles.aspx .treeNode { color:blue; font:14px Arial, Sans-Serif; } .rootNode { font-size:18px; width:100%; border-bottom:Solid 1px black; From the Library of Wow! eBook Using the TreeView Control 1075 } .leafNode { border:Dotted 2px black; padding:4px; background-color:#eeeeee; font-weight:bold; } TreeView Styles . | 1074 CHAPTER 22 Using the Navigation Controls RootNodeStyle Applied to root nodes Tree nodes with no parent nodes . SelectedNodeStyle Applied to the selected node. For example the page in Listing 22.30 uses several of these Style objects to format a TreeView control see Figure 22.23 . FIGURE 22.23 Using Styles with the TreeView control. LISTING 22.30 TreeViewStyles.aspx @ Page Language C DOCTYPE html PUBLIC - W3C DTD XHTML 1.1 EN http www.w3.org TR xhtml11 DTD xhtml11.dtd html xmlns http www.w3.org 1999 xhtml head id Head1 runat server style type text css .treeNode color blue font 14px Arial Sans-Serif .rootNode font-size 18px width 100 border-bottom Solid 1px black From the Library of Wow eBook Using the TreeView Control 1075 .leafNode border Dotted 2px black padding 4px background-color eeeeee font-weight bold style title TreeView Styles title head body form id form1 runat server div asp TreeView id TreeView1 NodeStyle-CssClass treeNode RootNodeStyle-CssClass rootNode LeafNodeStyle-CssClass leafNode Runat server Nodes asp TreeNode Text Home asp TreeNode Text Products asp TreeNode Text First Product asp TreeNode Text Second Product asp TreeNode asp TreeNode Text Services asp TreeNode Text First Service asp TreeNode Text Second Service asp TreeNode asp TreeNode Nodes asp TreeView div form body html 22 Furthermore you can apply styles to particular Tree node levels by taking advantage of the TreeView control s Levelstyles property. The page in Listing 22.31 uses the Levelstyles property to format first level nodes differently than second level nodes and third level nodes see Figure 22.24 . From the Library of Wow eBook 1076 CHAPTER 22 Using the Navigation Controls FIGURE 22.24 Applying styles to different TreeView node levels. LISTING 22.31 TreeViewLevelStyles.aspx @ Page Language C DOCTYPE html PUBLIC - W3C DTD XHTML 1.1 EN http www.w3.org TR xhtml11 DTD xhtml11.dtd html xmlns http www.w3.org 1999 xhtml head id Head1 runat server style type text css .nodeLevel1 .

TÀI LIỆU LIÊN QUAN