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

Represents an IStringConverter that converts values to strings using a dictionary-based lookup mechanism. Maps input values to string outputs based on key-value pairs defined in the dictionary.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class DictionaryStringConverter : IStringConverter

Inheritance: objectDictionaryStringConverter

Implements: IStringConverter

Constructors

C#
public DictionaryStringConverter()

Properties

Gets the collection of dictionary items used for string conversion.

C#
public List<DictionaryStringConverterItem> Dictionary { get; }

Methods

Converts a value to a string by looking it up in the dictionary.

C#
public string Convert(object value, object context)
Parameters:valueobject

The value to convert (used as the lookup key).

contextobject

The conversion context (not used).

Returns:

string

The corresponding string value from the dictionary if found; otherwise, the string representation of the input value.

Implements: IStringConverter.Convert(object, object)