Method ConvertTo
ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)
Attempts to convert a GridLength instance to the given type.
public override object ConvertTo(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object value, Type destinationType)
Parameters
typeDescriptorContext
ITypeDescriptorContextThe ITypeDescriptorContext for this call.
cultureInfo
CultureInfoThe CultureInfo which is respected when converting.
value
objectThe GridLength to convert.
destinationType
TypeThe type to which to convert the GridLength instance.
Returns
- object
The object which was constructed.
Exceptions
- ArgumentNullException
An ArgumentNullException is thrown if the example object is null.
- ArgumentException
An ArgumentException is thrown if the object is not null and is not a GridLength, or if the destinationType isn't one of the valid destination types.