Provides a type converter to convert between string and DisplayTextFormatter objects. This converter enables XAML serialization and deserialization of display text formatter configurations.
Definition
Namespace:Telerik.Maui.Controls.AutoComplete
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class DisplayTextFormatterTypeConverter : TypeConverter
Inheritance: objectTypeConverterDisplayTextFormatterTypeConverter
Inherited Members
Constructors
public DisplayTextFormatterTypeConverter()
Methods
Returns whether this converter can convert an object of the given type to a DisplayTextFormatter.
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
An ITypeDescriptorContext that provides a format context.
sourceTypeTypeA Type that represents the type you want to convert from.
Returns:true if this converter can perform the conversion and sourceType is string; otherwise, false.
Overrides:
Returns whether this converter can convert a DisplayTextFormatter to an object of the given type.
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
An ITypeDescriptorContext that provides a format context.
destinationTypeTypeA Type that represents the type you want to convert to.
Returns:true if this converter can perform the conversion and destinationType is string; otherwise, false.
Overrides:
Converts the given string value to a DisplayTextFormatter object.
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
An ITypeDescriptorContext that provides a format context.
cultureCultureInfoThe CultureInfo to use as the current culture.
valueobjectReturns:A DisplayTextFormatter object created from the string value.
Overrides:
Converts the given DisplayTextFormatter value to a string representation.
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
An ITypeDescriptorContext that provides a format context.
cultureCultureInfoA CultureInfo to use for formatting.
valueobjectThe object to convert.
destinationTypeTypeThe Type to convert the value parameter to.
Returns:A string representation of the value.
Overrides: