Back to Devexpress

TreeList.PreviewLineCount Property

windowsforms-devexpress-dot-xtratreelist-dot-treelist-153d6e9f.md

latest2.9 KB
Original Source

TreeList.PreviewLineCount Property

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

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
[DefaultValue(1)]
[XtraSerializableProperty]
public int PreviewLineCount { get; set; }
vb
<DefaultValue(1)>
<XtraSerializableProperty>
Public Property PreviewLineCount As Integer

Property Value

TypeDefaultDescription
Int321

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.

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

ShowPreview

AutoCalcPreviewLineCount

PreviewFieldName

GetPreviewText

CustomDrawNodePreview

MeasurePreviewHeight

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace