TreeView::SelectedNodeStyle Property
Gets the TreeNodeStyle object that controls the appearance of the selected node in the TreeView control.
Assembly: System.Web (in System.Web.dll)
public: [PersistenceModeAttribute(PersistenceMode::InnerProperty)] property TreeNodeStyle^ SelectedNodeStyle { TreeNodeStyle^ get(); }
Property Value
Type: System.Web.UI.WebControls::TreeNodeStyle^A TreeNodeStyle that represents the style of the selected node in the TreeView control. The default is null, 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.
Available since 2.0