ASPxTreeList.Styles Property

Provides access to the style settings that control the appearance of the ASPxTreeList's elements.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v19.2.dll

Declaration

public TreeListStyles Styles { get; }
Public ReadOnly Property Styles As TreeListStyles

Property Value

Type Description
TreeListStyles

A TreeListStyles object that provides style settings used to paint the ASPxTreeList.

Remarks

The following example shows how to customize style settings used to paint column headers and the focused node in code:


protected void Page_Load(object sender, EventArgs e) {
    ASPxTreeList1.Styles.Header.Assign(CreateHeaderStyle());
    CustomizeFocusedNodeStyle(ASPxTreeList1, Color.Orange, Color.Black);
}
private void CustomizeFocusedNodeStyle(ASPxTreeList treeList, Color bkColor, Color foreColor) {
    treeList.Styles.FocusedNode.BackColor = bkColor;
    treeList.Styles.FocusedNode.ForeColor = foreColor;
}
private TreeListHeaderStyle CreateHeaderStyle() {
    TreeListHeaderStyle style = new TreeListHeaderStyle();
    style.BackColor = Color.LightBlue;
    style.ForeColor = Color.Gray;
    style.Font.Italic = true;
    return style;
}

For more information, see Appearance Customization.

See Also