System.Web.UI.WebControls.TreeView.LevelStyles Property

Gets a collection of System.Web.UI.WebControls.Style objects that represent the node styles at the individual levels of the tree.

Syntax

[System.ComponentModel.Editor("System.Web.UI.Design.WebControls.TreeNodeStyleCollectionEditor,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.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.ComponentModel.DefaultValue(null)]
public TreeNodeStyleCollection LevelStyles { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the TreeView.LevelStyles collection as an alternative to the individual style properties (such as the TreeView.NodeStyle property) to control the style of nodes at the individual levels of the tree. The first style in the collection corresponds to the style of nodes in the first level of the tree. The second style in the collection corresponds to the style of nodes in the second level of the tree, and so on. This property is most often used to generate table of contents–style navigation menus where nodes at a certain level should have the same appearance, regardless of whether they have child nodes.

Style properties are applied in the following order:

[The 'ordered' type of list has not been implemented in the ECMA stylesheet.]

Requirements

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