Last post Jun 08, 2005 05:32 PM by PLBlum
Jun 07, 2005 11:44 PM|Salameh|LINK
I have a property which contains a subproperty. The property is contected to an UITypeEditor. The UITypeEdidor then loads the new data to the subproperty. The subproperty is defined as Browsable(false).
For a lack of knowing how to define the property, i defined it as :ExpandableObjectConverter. I don't want this property to be expandable, because its only subproperty is not browsable and besides there is nothing to look at because its only subproperty is
not browsable. How do i define the property to get rid of the (+) in the properties window and still have the property have subproperties.
I suppose i Replace the :ExpandableObjectConverter with another key word.
Jun 08, 2005 05:32 PM|PLBlum|LINK
ExpandableObjectConverter is a TypeConverter. In the Properties Editor, one of its jobs is to display something in the cell. You can create a TypeConverter to show any text you like.
Here is the structure of a TypeConverter that you can use to fill in your own text. The pValue parameter is the property value.
public class MyTypeConverter : TypeConverter
public override object ConvertTo(ITypeDescriptorContext pContext,
CultureInfo pCulture, object pValue, Type pDestinationType)
if (pDestinationType == typeof(string))
if (pValue == null)
return "some text"
return base.ConvertTo(pContext, pCulture, pValue, pDestinationType);
On the property, use: