ResourceTreeControl.TreeListViewStyle Property

Gets or sets a TreeListView style that is applied to the Resource Tree. This is a dependency property.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v20.2.dll


public Style TreeListViewStyle { get; set; }
Public Property TreeListViewStyle As Style

Property Value

Type Description

A Style object providing corresponding style settings.


Target type: DevExpress.Xpf.Grid.TreeListView.

The example below illustrates how to use the TreeListViewStyle to show images for ResourceTree's items.

<local:TreeNodeTypeImageSelector x:Key="imageSelector" Icon1="{dx:DXImage Image=Add_16x16.png}" Icon2="{dx:DXImage Image=Remove_16x16.png}" Icon3="{dx:DXImage Image=Delete_16x16.png}"/>
    <Style TargetType="dxg:TreeListView">
        <Setter Property="ShowNodeImages" Value="True"/>
        <Setter Property="NodeImageSelector" Value="{StaticResource imageSelector}"/>
 public class TreeNodeTypeImageSelector : TreeListNodeImageSelector {
    public ImageSource Icon1 { get; set; }
    public ImageSource Icon2 { get; set; }
    public ImageSource Icon3 { get; set; }

    public override ImageSource Select(TreeListRowData rowData) {
        var value = (ResourceItem)rowData.Row;
        DataType node = value.SourceObject as DataType;
        if (null != node){
            if (node.Id == 1)
                return Icon1;
            if (node.Id == 2)
                return Icon2;
            if (node.Id == 3)
                return Icon3;
        return null;
See Also