Class
DictionaryStringConverter

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:

cs-api-definition
public class DictionaryStringConverter : IStringConverter

Inheritance: objectDictionaryStringConverter

Implements: IStringConverter

Constructors

DictionaryStringConverter()

Declaration

cs-api-definition
public DictionaryStringConverter()

Properties

Dictionary

Gets the collection of dictionary items used for string conversion.

Declaration

cs-api-definition
public List<DictionaryStringConverterItem> Dictionary { get; }

Property Value

List<DictionaryStringConverterItem>

Methods

Convert(object, object)

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

Declaration

cs-api-definition
public string Convert(object value, object context)

Parameters

value

object

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

context

object

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)