This documentation is archived and is not being maintained.

TreeViewImageSet Enumeration

Represents an image set to use in the TreeView control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public enum TreeViewImageSet
public enum TreeViewImageSet
public enum TreeViewImageSet

 Member nameDescription
ArrowsA predefined set of arrow images. 
BulletedListA predefined set of diamond-shaped bullet images. 
BulletedList2A predefined set of square-shaped bullet images. 
BulletedList3A predefined set of sectioned, diamond shaped bullet images. 
BulletedList4A predefined set of alternate sectioned, diamond shaped bullet images in sizes that vary by level. 
ContactsA predefined set of MSN Messenger–styled images. 
CustomA user-defined set of images. This is the default value of the ImageSet
EventsA predefined set of event log–styled images. 
FaqA predefined set of FAQ-styled images. 
InboxA predefined set of e-mail–styled images. 
MsdnA predefined set of Microsoft MSDN developer program–styled images. 
NewsA predefined set of newsgroup-styled images. 
SimpleA predefined set of simple-shaped outline images. 
Simple2A predefined set of filled simple-shaped images. 
WindowsHelpA predefined set of Microsoft Windows Help–styled images. 
XPFileExplorerA predefined set of Windows Explorer for Microsoft Windows XP–styled images. 

The TreeViewImageSet enumeration is used to represent the different sets of images that can be displayed in the TreeView control. You can select from a predefined set of images or create your own custom set by setting the ImageSet property to the Custom value. When defining a custom set of images, you should specify an image for each of the properties in the following table. Otherwise, the default image for that property is used.




The URL to a custom image for the collapsed node indicator.


The URL to a custom image for the expanded node indicator.


The URL to a folder that contains custom images for lines-connecting nodes.


The URL to a custom image for the non-expanding node indicator.

The following code example demonstrates how to use the TreeViewImageSet enumeration to indicate which image set to use in the TreeView control.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" >
  <head runat="server">
    <title>TreeView ImageSet Example</title>
    <form id="form1" runat="server">
      <h3>TreeView ImageSet Example</h3>
      <asp:TreeView id="LinksTreeView"
          <asp:TreeNode Value="Home" 
            <asp:TreeNode Value="Page 1" 
              <asp:TreeNode Value="Section 1" 
                Text="Section 1"
            <asp:TreeNode Value="Page 2" 
              Text="Page 2"


Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0