windowsforms-devexpress-dot-xtratreelist-dot-treelistoptionsbehavior-28af697f.md
Gets or sets whether a user can expand or collapse a node by double clicking it.
Namespace : DevExpress.XtraTreeList
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool AllowExpandOnDblClick { get; set; }
<DefaultValue(True)>
<XtraSerializableProperty>
Public Overridable Property AllowExpandOnDblClick As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true if a double-click on a node expands or collapses it; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to AllowExpandOnDblClick |
|---|---|
| TreeList |
.OptionsBehavior .AllowExpandOnDblClick
|
Activate the AllowExpandOnDblClick option to allow users to expand or collapse a node by double clicking it. If the TreeList control is editable, users can double click the node’s indicator cell to toggle its expanded state.
If data editing is disabled, users can double click any cell within a node to expand or collapse it:
// Disable data editing in the TreeList.
treeList1.OptionsBehavior.Editable = false;
// Enable expand/collapse on double click.
treeList1.OptionsBehavior.AllowExpandOnDblClick = true;
The following animation shows the result:
See the following help topic for more information: End-User Capabilities - Expand and Collapse Nodes.
See Also