New to Telerik UI for WinForms? Start a free 30-day trial

Converts Point3D values to and from culture-aware, list-separator-delimited X, Y, and Z strings, and supports component-model property editing.

Definition

Namespace:Telerik.WinControls.UI.Carousel

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public sealed class Point3DConverter : TypeConverter

Inheritance: objectTypeConverterPoint3DConverter

Inherited Members TypeConverter.CanConvertFrom(Type)TypeConverter.CanConvertTo(Type)TypeConverter.ConvertFrom(object)TypeConverter.ConvertFromInvariantString(string)TypeConverter.ConvertFromInvariantString(ITypeDescriptorContext, string)TypeConverter.ConvertFromString(string)TypeConverter.ConvertFromString(ITypeDescriptorContext, string)TypeConverter.ConvertFromString(ITypeDescriptorContext, CultureInfo, string)TypeConverter.ConvertTo(object, Type)TypeConverter.ConvertToInvariantString(object)TypeConverter.ConvertToInvariantString(ITypeDescriptorContext, object)TypeConverter.ConvertToString(object)TypeConverter.ConvertToString(ITypeDescriptorContext, object)TypeConverter.ConvertToString(ITypeDescriptorContext, CultureInfo, object)TypeConverter.CreateInstance(IDictionary)TypeConverter.GetCreateInstanceSupported()TypeConverter.GetProperties(object)TypeConverter.GetProperties(ITypeDescriptorContext, object)TypeConverter.GetPropertiesSupported()TypeConverter.GetStandardValues()TypeConverter.GetStandardValues(ITypeDescriptorContext)TypeConverter.GetStandardValuesExclusive()TypeConverter.GetStandardValuesExclusive(ITypeDescriptorContext)TypeConverter.GetStandardValuesSupported()TypeConverter.GetStandardValuesSupported(ITypeDescriptorContext)TypeConverter.IsValid(object)TypeConverter.IsValid(ITypeDescriptorContext, object)...

Constructors

C#
public Point3DConverter()

Methods

Determines whether this converter accepts strings in addition to the types supported by TypeConverter.

C#
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters:contextITypeDescriptorContext

A descriptor context that may provide additional conversion information.

sourceTypeType

The type to convert from.

Returns:

bool

true for strings or when the base converter supports the source type.

Overrides: TypeConverter.CanConvertFrom(ITypeDescriptorContext, Type)

Determines whether this converter can produce an instance descriptor in addition to the types supported by TypeConverter.

C#
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameters:contextITypeDescriptorContext

A descriptor context that may provide additional conversion information.

destinationTypeType

The destination type.

Returns:

bool

true for InstanceDescriptor or when the base converter supports the destination type.

Overrides: TypeConverter.CanConvertTo(ITypeDescriptorContext, Type)

Parses a culture-aware, list-separator-delimited string containing exactly three coordinates, or delegates other inputs to the base converter.

C#
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters:contextITypeDescriptorContext

A descriptor context that may provide additional conversion information.

cultureCultureInfo

The culture used to parse the coordinates; the current culture is used when this is null.

valueobject

The string to parse, or a value handled by the base converter.

Returns:

object

A Point3D for a valid coordinate string, null for an empty string, or the base converter's result for other inputs.

Exceptions: ArgumentException

The string does not contain exactly three coordinates.

Overrides: TypeConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, object)

Converts a Point3D to a culture-aware coordinate string or an instance descriptor, and delegates other conversions to the base converter.

C#
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters:contextITypeDescriptorContext

A descriptor context that may provide additional conversion information.

cultureCultureInfo

The culture used to format the coordinates; the current culture is used when this is null.

valueobject

The value to convert.

destinationTypeType

The requested destination type.

Returns:

object

The converted value, or the base converter's result for unsupported conversion cases.

Exceptions: ArgumentNullException

destinationType is null.

Overrides: TypeConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)

Creates a Point3D from component property values named X, Y, and optionally Z.

C#
public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues)
Parameters:contextITypeDescriptorContext

A descriptor context that may provide additional creation information.

propertyValuesIDictionary

The coordinate values; X and Y must be double values, while a missing or non-double Z defaults to zero.

Returns:

object

A point initialized from the supplied coordinate values.

Exceptions: ArgumentNullException

propertyValues is null.

ArgumentException

X or Y is missing or is not a double value.

Overrides: TypeConverter.CreateInstance(ITypeDescriptorContext, IDictionary)

Indicates that the converter can create a point from its component properties.

C#
public override bool GetCreateInstanceSupported(ITypeDescriptorContext context)
Parameters:contextITypeDescriptorContext

A descriptor context that may provide additional information.

Returns:

bool

Always true.

Overrides: TypeConverter.GetCreateInstanceSupported(ITypeDescriptorContext)

Gets the X, Y, and Z property descriptors in that order.

C#
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
Parameters:contextITypeDescriptorContext

A descriptor context that may provide additional property information.

valueobject

The object whose properties are requested.

attributesAttribute[]

Attributes used to filter the returned properties.

Returns:

PropertyDescriptorCollection

The Point3D property descriptors sorted as X, Y, Z.

Overrides: TypeConverter.GetProperties(ITypeDescriptorContext, object, Attribute[])

Indicates that the converter exposes the point's component properties.

C#
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
Parameters:contextITypeDescriptorContext

A descriptor context that may provide additional information.

Returns:

bool

Always true.

Overrides: TypeConverter.GetPropertiesSupported(ITypeDescriptorContext)