aspnet-devexpress-dot-web-dot-aspxtreelist-dot-aspxtreelist-f9d0ce8f.md
Provides access to the style settings that control the appearance of the ASPxTreeList’s elements.
Namespace : DevExpress.Web.ASPxTreeList
Assembly : DevExpress.Web.ASPxTreeList.v25.2.dll
NuGet Package : DevExpress.Web
public TreeListStyles Styles { get; }
Public ReadOnly Property Styles As TreeListStyles
| Type | Description |
|---|---|
| TreeListStyles |
A TreeListStyles object that provides style settings used to paint the ASPxTreeList.
|
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