public override object ConvertTo(ITypeDescriptorContext context,
System.Globalization.CultureInfo culture,
object value,
Type destinationType)
{
// Can always convert to a string representation
if (destinationType == typeof(string))
{
// Cast to correct type
ButtonSpecFormFixed buttonSpec = (ButtonSpecFormFixed)value;
// Ask the button spec for the correct string
return buttonSpec.ToString();
}
// Let base class attempt other conversions
return base.ConvertTo(context, culture, value, destinationType);
}