Back to Devexpress

TreeListOptionsBehavior.AutoNodeHeight Property

windowsforms-devexpress-dot-xtratreelist-dot-treelistoptionsbehavior-340adb89.md

latest3.4 KB
Original Source

TreeListOptionsBehavior.AutoNodeHeight Property

Gets or sets whether the height of each node is automatically adjusted to completely display the contents of its cells.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool AutoNodeHeight { get; set; }
vb
<DefaultValue(True)>
<XtraSerializableProperty>
Public Overridable Property AutoNodeHeight As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true to enable automatic calculation of the heights of nodes; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AutoNodeHeight
TreeList

.OptionsBehavior .AutoNodeHeight

|

Remarks

When large text values or images need to be displayed the MemoEdit and PictureEdit editors are used as in-place editors. Set the AutoNodeHeight option to true to ensure that the contents of the cells are completely displayed.

If the AutoNodeHeight option is set to false , all nodes have the same height which is specified by the Tree List’s TreeList.RowHeight property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AutoNodeHeight 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.

create-custom-editor-with-auto-height-functionality/CS/TreeListAutoNodeHeight/Form1.cs#L16

csharp
CustomAnyControlEditRepositoryItem CustomRepository = new CustomAnyControlEditRepositoryItem();
treeList1.OptionsBehavior.AutoNodeHeight = true;
treeList1.RepositoryItems.Add(CustomRepository);

See Also

CalcNodeHeight

TreeListOptionsBehavior Class

TreeListOptionsBehavior Members

DevExpress.XtraTreeList Namespace