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

CustomDrawNodePreviewEventArgs.PreviewText Property

Gets or sets the painted preview section’s text.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public string PreviewText { get; set; }

#Property Value

Type Description
String

A string value representing the text of the preview section being painted.

#Remarks

The PreviewText property can used for the following purposes.

  • Read this property to obtain the text which is about to be displayed within the painted preview section. Paint the obtained text within the preview section’s boundaries specified by the CustomDrawEventArgs.Bounds property.
  • Assign a value to this property and leave the CustomDrawEventArgs.Handled property set to false. The preview section with modified text will be painted in the default manner.

Note: you can also assign custom text to the preview section by handling the TreeList.GetPreviewText event. However, the TreeList.CustomDrawNodePreview event fires later and thus changes performed within its handler are higher priority.

See Also