TreeView::HoverNodeStyle Property
Gets a reference to the TreeNodeStyle object that allows you to set the appearance of a node when the mouse pointer is positioned over it.
Assembly: System.Web (in System.Web.dll)
public: [PersistenceModeAttribute(PersistenceMode::InnerProperty)] property Style^ HoverNodeStyle { Style^ get(); }
Property Value
Type: System.Web.UI.WebControls::Style^A reference to the TreeNodeStyle that represents the style of a node when the mouse pointer is positioned over it.
Use the HoverNodeStyle property to control the appearance of a node when the mouse pointer is positioned over it. This property is read-only; however, you can set the properties of the TreeNodeStyle object that it returns. The properties can be set declaratively in the form Property-Subproperty, where Subproperty is a property of the TreeNodeStyle object (for example, HoverNodeStyle-ForeColor). The properties can also be set programmatically in the form Property.Subproperty (for example, HoverNodeStyle.ForeColor). This feature is supported only on script-capable clients.
Note |
|---|
To use the HoverNodeStyle property, you must include a <head> element with a runat="server" attribute. |
Common settings usually include a custom background color, foreground color, font properties, and node spacing. Style properties are applied in the following order:
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.
HoverNodeStyle.
Note |
|---|
The style settings for the HoverNodeStyle property override any corresponding node style settings that are in the NodeStyle, RootNodeStyle, ParentNodeStyle, LeafNodeStyle, or SelectedNodeStyle property. |
The HoverNodeStyle property is not rendered for a node with its SelectAction property set to TreeNodeSelectAction.None.
Unlike the ParentNodeStyle and the LeafNodeStyle properties, which are TreeNodeStyle objects, the HoverNodeStyle property is a Style object.
The following code example demonstrates how to use the HoverNodeStyle property to control the appearance of a node when the mouse pointer is positioned over it. For this example to work, you must include a <head> element with a runat="server" attribute.
Available since 2.0
