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)
[PersistenceModeAttribute(PersistenceMode::InnerProperty)] public: property TreeNodeStyle^ SelectedNodeStyle { TreeNodeStyle^ get (); }
Property Value
Type: System.Web.UI.WebControls::TreeNodeStyleA TreeNodeStyle that represents the style of the selected node in the TreeView control. The default is nullptr, 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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.