New to Telerik UI for .NET MAUIStart a free 30-day trial

Represents a display text formatter that extracts text from objects using a property path.

Definition

Namespace:Telerik.Maui.Controls.AutoComplete

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public sealed class DisplayTextFormatter : IDisplayTextFormatter

Inheritance: objectDisplayTextFormatter

Implements: IDisplayTextFormatter

Constructors

Initializes a new instance of the DisplayTextFormatter class with a default property path.

C#
public DisplayTextFormatter()

Initializes a new instance of the DisplayTextFormatter class with the specified display member path.

C#
public DisplayTextFormatter(string displayMemberPath)
Parameters:displayMemberPathstring

The property path used to extract display text from objects.

Methods

Formats the specified item by extracting its display text using the configured property path.

C#
public string FormatItem(object item)
Parameters:itemobject

The item to format.

Returns:

string

A string representation of the item's display text.

Implements: IDisplayTextFormatter.FormatItem(object)