Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeList.PreviewLineCount Property

Gets or sets the number of text lines in preview sections.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

[DefaultValue(1)]
[XtraSerializableProperty]
public int PreviewLineCount { get; set; }

#Property Value

Type Default Description
Int32 1

An integer value specifying the number of text lines within preview sections.

#Remarks

To set the same height for all preview sections, use the PreviewLineCount property. This property cannot be set to a value less than 1 or greater than 10.

In the following image, the PreviewLineCount property’s value is 2.

TreeListPreview_PreviewLineCount

To automatically calculate the preview section height, enable the TreeListOptionsView.AutoCalcPreviewLineCount option. In this case, preview sections in different nodes might be different heights. The Tree List ignores the PreviewLineCount setting if the AutoCalcPreviewLineCount option is enabled.

The TreeList.MeasurePreviewHeight event allows you to dynamically specify heights for individual nodes.

See Also