Skip to main content
A newer version of this page is available. .

TreeListNode.IsExpandButtonVisible Property

Gets or sets whether the expand button is displayed within the node or not.

Namespace: DevExpress.Xpf.Grid

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core

Declaration

public DefaultBoolean IsExpandButtonVisible { get; set; }

Property Value

Type Description
DefaultBoolean

A DefaultBoolean enumeration value that specifies the expand button’s visibility within the node.

Available values:

Name Description
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

Remarks

The TreeListView.NodeExpanding event can be handled to dynamically create child nodes. In this instance, when expanding a node, you do not know whether it has child nodes or not. If the node has no child nodes, hide the expand button by setting the IsExpandButtonVisible property to false.

To learn more, see Expanding and Collapsing Nodes .

Example

In this example, the TreeListView displays the file/folder tree. Child nodes that correspond to sub folders or files contained within a folder are dynamically created when a parent node is being expanded.

View Example

<Window x:Class="DynamicNodeLoading.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <Grid>
        <dxg:GridControl Name="grid">
            <dxg:GridControl.Columns>
                <dxg:GridColumn FieldName="Name" />
                <dxg:GridColumn FieldName="ItemType" />
                <dxg:GridColumn FieldName="Size" />
                <dxg:GridColumn FieldName="FullName" />
            </dxg:GridControl.Columns>
            <dxg:GridControl.View>
                <dxg:TreeListView Name="treeListView1" AutoWidth="True"
                                  NodeExpanding="treeListView1_NodeExpanding"/>
            </dxg:GridControl.View>
        </dxg:GridControl>
    </Grid>
</Window>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsExpandButtonVisible property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also