Skip to main content

TreeListAppearanceCollection Class

Provides the appearance settings used to paint the Tree List.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v23.2.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

public class TreeListAppearanceCollection :
    TreeListBaseAppearanceCollection

The following members return TreeListAppearanceCollection objects:

Remarks

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.

Example

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.

image

treeList1.Appearance.EvenRow.BackColor = Color.PaleVioletRed;
treeList1.Appearance.OddRow.BackColor = Color.LightPink;
treeList1.OptionsView.EnableAppearanceEvenRow = true;
treeList1.OptionsView.EnableAppearanceOddRow = true;

Inheritance

Object
BaseAppearanceCollection
DevExpress.XtraTreeList.TreeListBaseAppearanceCollection
TreeListAppearanceCollection
See Also