ClassDecorationUIConverter
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
DecorationUIConverter()
Declaration
public DecorationUIConverter()
Methods
CanConvertFrom(ITypeDescriptorContext, Type)
Determines whether the provided source type can be converted from the specified type.
Declaration
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
Parameters
typeDescriptorContext
An ITypeDescriptorContext that provides a format context.
sourceType
The type to check for conversion.
Returns
Returns true if the source type can be converted; otherwise, false.
Overrides
CanConvertTo(ITypeDescriptorContext, Type)
Determines whether the conversion from a specified source type to a target type is supported.
Declaration
public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType)
Parameters
typeDescriptorContext
An instance of ITypeDescriptorContext that provides a format context.
destinationType
The Type that represents the type to convert to.
Returns
True if the conversion is supported; otherwise, false.
Overrides
ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
Converts the specified object to a text decoration representation based on the provided context and culture information.
Declaration
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
Parameters
typeDescriptorContext
The context in which the conversion is being performed, providing information about the environment.
cultureInfo
The culture information used for the conversion process.
source
The object to be converted to a text decoration representation.
Returns
A value of type T that represents the converted text decoration.
Overrides
ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)
Converts the specified value to a specified type using the provided context and culture information.
Declaration
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
context
An object that provides a format context for the conversion.
culture
A CultureInfo object that specifies the culture to be used for the conversion.
value
The value to convert.
destinationType
The 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