Method ConvertFrom
ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
Attempts to convert to a GridLength from the given object.
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
Parameters
typeDescriptorContext
ITypeDescriptorContextThe ITypeDescriptorContext for this call.
cultureInfo
CultureInfoThe CultureInfo which is respected when converting.
source
objectThe object to convert to a GridLength.
Returns
- object
The GridLength instance which was constructed.
Exceptions
- ArgumentNullException
An ArgumentNullException is thrown if the example object is null.
- ArgumentException
An ArgumentException is thrown if the example object is not null and is not a valid type which can be converted to a GridLength.