Export (0) Print
Expand All

TreeNode.BackColor Property

Gets or sets the background color of the tree node.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member BackColor : Color with get, set

Property Value

Type: System.Drawing.Color
The background Color of the tree node. The default is Color.Empty.

If the BackColor property is set to Color.Empty, the Color used is the BackColor property value of the TreeView control that the tree node is assigned to.

The following code example highlights any TreeNode objects a TreeView control that has its Checked property set to true by setting its BackColor property to Yellow. This code requires that you have a TreeView control on a Form with a collection of TreeNode objects.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft