windowsforms-devexpress-dot-xtratreelist-f1fd8edb.md
Provides the appearance settings used to paint the Tree List.
Namespace : DevExpress.XtraTreeList
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
public class TreeListAppearanceCollection :
TreeListBaseAppearanceCollection
Public Class TreeListAppearanceCollection
Inherits TreeListBaseAppearanceCollection
The following members return TreeListAppearanceCollection objects:
The TreeListAppearanceCollection class introduces properties that specify how the Tree List’s visual elements such as its column headers, expand buttons, node cells are painted. Each property returns the AppearanceObject object whose attributes specify the corresponding element’s background and foreground colors, font settings, gradient mode, etc. For example, the TreeListAppearanceCollection.FocusedRow property provides the appearance settings used to paint the data cells within the currently focused node.
To access the Tree List’s appearance settings, use the TreeList.Appearance property. For more information on appearances, see the Appearances document.
The Tree List’s visual elements can also be custom painted via the custom draw events. Refer to the Custom Drawing document for detailed information.
The following code shows how to use the EvenRow and OddRow properties to customize the appearance of even and odd rows in the TreeList. Note that these properties are in effect if the EnableAppearanceEvenRow and EnableAppearanceOddRow options are enabled.
treeList1.Appearance.EvenRow.BackColor = Color.PaleVioletRed;
treeList1.Appearance.OddRow.BackColor = Color.LightPink;
treeList1.OptionsView.EnableAppearanceEvenRow = true;
treeList1.OptionsView.EnableAppearanceOddRow = true;
TreeList1.Appearance.EvenRow.BackColor = Color.PaleVioletRed
TreeList1.Appearance.OddRow.BackColor = Color.LightPink
TreeList1.OptionsView.EnableAppearanceEvenRow = True
TreeList1.OptionsView.EnableAppearanceOddRow = True
Object BaseAppearanceCollection DevExpress.XtraTreeList.TreeListBaseAppearanceCollection TreeListAppearanceCollection GanttControlAppearanceCollection
See Also