PaletteConverter Class
Represents a type converter for the Palette type.
public sealed class PaletteConverter : TypeConverter
- Inheritance:
- object TypeConverter object
Constructors
PaletteConverter()
Initializes an instance of the class.
public PaletteConverter()
Methods
CanConvertFrom(ITypeDescriptorContext, Type)
Returns whether the type converter can convert an object from the specified type to the type of this converter.
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameter | Type | Description |
---|---|---|
context | ITypeDescriptorContext | An object that provides a format context. |
sourceType | Type | The type you want to convert from. |
Returns
- bool:
true
if this converter can perform the conversion; otherwise,false
.
ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
Converts from the specified value to the intended conversion type of the converter.
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameter | Type | Description |
---|---|---|
context | ITypeDescriptorContext | An object that provides a format context. |
culture | CultureInfo | The CultureInfo to use as the current culture. |
value | object | The value to convert to the type of this converter. |
Returns
- object:
The converted value.