In This Article

AnimationPointConverter Class

Represents a custom TypeConverter for System.Windows.Point type that uses custom parsing.

public class AnimationPointConverter : TypeConverter
Inheritance:
object TypeConverter object

Constructors

AnimationPointConverter()

Initializes an instance of the class.

public AnimationPointConverter()

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.

CanConvertTo(ITypeDescriptorContext, Type)

Returns whether the type converter can convert an object to the specified type.

public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameter Type Description
context ITypeDescriptorContext

An object that provides a format context.

destinationType Type

The type you want to convert to.

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.

Exceptions

Type Condition
NotImplementedException

ConvertFrom(ITypeDescriptorContext, CultureInfo, object) not implemented in base TypeConverter.

ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)

Converts the specified value object to the specified type.

public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
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 object to convert.

destinationType Type

The type to convert the object to.

Returns

object:

The converted object.

Exceptions

Type Condition
NotImplementedException

ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type) not implemented in base TypeConverter.

Inherited Members