Provides methods for converting text decoration settings to and from UI representations.
Definition
Namespace:Telerik.Windows.Documents.UI.TextDecorations.DecorationProviders
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class DecorationUIConverter : TypeConverter
Inheritance: objectTypeConverterDecorationUIConverter
Inherited Members
Constructors
public DecorationUIConverter()
Methods
Determines whether the provided source type can be converted from the specified type.
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
An ITypeDescriptorContext that provides a format context.
sourceTypeTypeThe type to check for conversion.
Returns:Returns true if the source type can be converted; otherwise, false.
Overrides:
Determines whether the conversion from a specified source type to a target type is supported.
public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType)
An instance of ITypeDescriptorContext that provides a format context.
destinationTypeTypeThe Type that represents the type to convert to.
Returns:True if the conversion is supported; otherwise, false.
Overrides:
Converts the specified object to a text decoration representation based on the provided context and culture information.
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
The context in which the conversion is being performed, providing information about the environment.
cultureInfoCultureInfoThe culture information used for the conversion process.
sourceobjectThe object to be converted to a text decoration representation.
Returns:A value of type T that represents the converted text decoration.
Overrides:
Converts the specified value to a specified type using the provided context and culture information.
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
An object that provides a format context for the conversion.
cultureCultureInfoA CultureInfo object that specifies the culture to be used for the conversion.
valueobjectThe value to convert.
destinationTypeTypeThe Type to which the value should be converted.
Returns:The converted value of the specified type. If the conversion fails, it may return null or throw an exception, depending on the implementation.
Overrides: