Class DisplayTextFormatterTypeConverter
Provides a type converter to convert between System.String and DisplayTextFormatter objects. This converter enables XAML serialization and deserialization of display text formatter configurations.
Inheritance
Namespace: Telerik.Maui.Controls.AutoComplete
Assembly: Telerik.Maui.Controls.dll
Syntax
public class DisplayTextFormatterTypeConverter : TypeConverter
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
System.ComponentModel.ITypeDescriptorContext
context
An System.ComponentModel.ITypeDescriptorContext that provides a format context. |
System.Type
sourceType
A System.Type that represents the type you want to convert from. |
Returns
System.Boolean
|
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
System.ComponentModel.ITypeDescriptorContext
context
An System.ComponentModel.ITypeDescriptorContext that provides a format context. |
System.Type
destinationType
A System.Type that represents the type you want to convert to. |
Returns
System.Boolean
|
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
System.ComponentModel.ITypeDescriptorContext
context
An System.ComponentModel.ITypeDescriptorContext that provides a format context. |
System.Globalization.CultureInfo
culture
The System.Globalization.CultureInfo to use as the current culture. |
System.Object
value
The System.Object to convert, expected to be a System.String. |
Returns
System.Object
A DisplayTextFormatter object created from the string value. |
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
System.ComponentModel.ITypeDescriptorContext
context
An System.ComponentModel.ITypeDescriptorContext that provides a format context. |
System.Globalization.CultureInfo
culture
A System.Globalization.CultureInfo to use for formatting. |
System.Object
value
The System.Object to convert. |
System.Type
destinationType
The System.Type to convert the value parameter to. |
Returns
System.Object
A System.String representation of the value. |