Back to Devexpress

CustomDrawNodePreviewEventArgs.PreviewText Property

windowsforms-devexpress-dot-xtratreelist-dot-customdrawnodeprevieweventargs-b8775069.md

latest2.3 KB
Original Source

CustomDrawNodePreviewEventArgs.PreviewText Property

Gets or sets the painted preview section’s text.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
public string PreviewText { get; set; }
vb
Public Property PreviewText As String

Property Value

TypeDescription
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

CustomDrawNodePreviewEventArgs Class

CustomDrawNodePreviewEventArgs Members

DevExpress.XtraTreeList Namespace