ASPxTreeList.Styles Property
In This Article
Provides access to the style settings that control the appearance of the ASPxTreeList’s elements.
Namespace: DevExpress.Web.ASPxTreeList
Assembly: DevExpress.Web.ASPxTreeList.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public TreeListStyles Styles { get; }
#Property Value
Type | Description |
---|---|
Tree |
A Tree |
#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