// Your custom data type
public class MySize
{
...
public int Width{get{...}set{...}}
public int Height{get{...}set{...}}
}
public class MySizeConverter:
ExpandableObjectConverter
{
public override bool GetCreateInstanceSupported(ITypeDescriptorContext context)
{
return true;
}
public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues)
{
MySize size = new MySize();
size.Width = (int)propertyValues[(object)'Width'];
size.Height = (int)propertyValues[(object)'Height'];
return (object)size;
}
Share with