System.Web.UI.WebControls.TreeView.ExpandImageUrl Property

Gets or sets the URL to a custom image for the expandable node indicator.

Syntax

[System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.Web.UI.UrlProperty]
[System.ComponentModel.DefaultValue("")]
public string ExpandImageUrl { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the TreeView.ExpandImageUrl property to specify a custom image for the expandable node indicator. This image is displayed next to an expandable node and is usually a plus sign (+).

When the TreeView.ShowExpandCollapse property is set to true, the System.Web.UI.WebControls.TreeView control displays a plus sign (+) or minus sign (-) or a placeholder image next to a node to indicate whether the node is expandable, collapsible, or non-expandable, respectively. You can specify custom images by first setting the TreeView.ImageSet property to TreeViewImageSet.Custom, and then setting the TreeView.NoExpandImageUrl, TreeView.ExpandImageUrl, and TreeView.CollapseImageUrl properties to the URLs for the custom images. If no images are specified, the default images are used. To hide the expansion node indicators, set the TreeView.ShowExpandCollapse property to false.

Note:

To ensure that nodes align correctly in the System.Web.UI.WebControls.TreeView control when using custom images, make sure that all the images that are specified by the TreeView.NoExpandImageUrl, TreeView.ExpandImageUrl, and TreeView.CollapseImageUrl properties have the same dimensions.

To display a custom image correctly, you may need to set TreeView.ShowLines to false.

When using a custom image for the expandable node indicator, you should also consider setting the TreeView.ExpandImageToolTip property to specify a ToolTip for the image.

The value of this property is stored in view state.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0