TreeView.SelectedNodeStyle Property
Assembly: System.Web (in system.web.dll)
/** @property */ public TreeNodeStyle get_SelectedNodeStyle ()
public function get SelectedNodeStyle () : TreeNodeStyle
Property Value
A TreeNodeStyle that represents the style of the selected node in the TreeView control. The default is a null reference (Nothing in Visual Basic), which indicates that the SelectedNodeStyle property is not set.Use the SelectedNodeStyle property to control the appearance of the selected node in the TreeView control. This property is read-only; however, you can set the properties of the TreeNodeStyle object it returns. The properties can be set declaratively in the form Property-Subproperty, where Subproperty is a property of the TreeNodeStyle object (for example, SelectedNodeStyle-ForeColor). The properties can also be set programmatically in the form Property.Subproperty (for example, SelectedNodeStyle.ForeColor). Common settings usually include a custom background color, foreground color, font properties, and node spacing. Style properties are applied in the following order of precedence:
-
RootNodeStyle, ParentNodeStyle, or LeafNodeStyle, depending on the node type. If the LevelStyles collection is defined, it is applied at this time, overriding the other node style properties.
-
SelectedNodeStyle.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.