Class DecorationUIConverter
Provides methods for converting text decoration settings to and from UI representations.
Inheritance
Namespace: Telerik.Windows.Documents.UI.TextDecorations.DecorationProviders
Assembly: Telerik.Windows.Controls.RichTextBox.dll
Syntax
public class DecorationUIConverter : TypeConverter
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
System.ComponentModel.ITypeDescriptorContext
typeDescriptorContext
An ITypeDescriptorContext that provides a format context. |
System.Type
sourceType
The type to check for conversion. |
Returns
System.Boolean
Returns true if the source type can be converted; otherwise, false. |
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
System.ComponentModel.ITypeDescriptorContext
typeDescriptorContext
An instance of System.ComponentModel.ITypeDescriptorContext that provides a format context. |
System.Type
destinationType
The System.Type that represents the type to convert to. |
Returns
System.Boolean
True if the conversion is supported; otherwise, false. |
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
System.ComponentModel.ITypeDescriptorContext
typeDescriptorContext
The context in which the conversion is being performed, providing information about the environment. |
System.Globalization.CultureInfo
cultureInfo
The culture information used for the conversion process. |
System.Object
source
The object to be converted to a text decoration representation. |
Returns
System.Object
A value of type T that represents the converted text decoration. |
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
System.ComponentModel.ITypeDescriptorContext
context
An object that provides a format context for the conversion. |
System.Globalization.CultureInfo
culture
A CultureInfo object that specifies the culture to be used for the conversion. |
System.Object
value
The value to convert. |
System.Type
destinationType
The Type to which the value should be converted. |
Returns
System.Object
The converted value of the specified type. If the conversion fails, it may return null or throw an exception, depending on the implementation. |