ClassDisplayTextFormatterTypeConverter
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
DisplayTextFormatterTypeConverter()
Declaration
public DisplayTextFormatterTypeConverter()
Methods
CanConvertFrom(ITypeDescriptorContext, Type)
Returns whether this converter can convert an object of the given type to a DisplayTextFormatter.
Declaration
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters
context
An ITypeDescriptorContext that provides a format context.
sourceType
A 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
CanConvertTo(ITypeDescriptorContext, Type)
Returns whether this converter can convert a DisplayTextFormatter to an object of the given type.
Declaration
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameters
context
An ITypeDescriptorContext that provides a format context.
destinationType
A 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
ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
Converts the given string value to a DisplayTextFormatter object.
Declaration
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters
context
An ITypeDescriptorContext that provides a format context.
culture
The CultureInfo to use as the current culture.
value
Returns
A DisplayTextFormatter object created from the string value.
Overrides
ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)
Converts the given DisplayTextFormatter value to a string representation.
Declaration
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
context
An ITypeDescriptorContext that provides a format context.
culture
A CultureInfo to use for formatting.
value
The object to convert.
destinationType
The Type to convert the value parameter to.
Returns
A string representation of the value.
Overrides