all groups > dotnet windows forms designtime > march 2005 >
You're in the

dotnet windows forms designtime

group:

ExpandableObjectConverter not working


ExpandableObjectConverter not working Andy
3/17/2005 1:30:02 PM
dotnet windows forms designtime:
I have a series of small classes that encapsulate some style
information for some custom controls. The types of information in
these classes are generally ints, Fonts and Colors.

I've applied the ExpandableObjectConverter to the various classes to
allow me to expand and set the properties at design time. The problem
is that it doesn't work reliably.

I have a form in which I test the design-time capabilities of the
various controls. In that form, which is in the same assembly as all
the expandable types, everything seems to work fine. I can drill down
through several layers of expandable types and set/view the
properties.

I have a form in another assembly that is part of the same solution
and which contains a reference to the assembly with the expandable
types. In that form, it's as if the ExpandableObjectConverter was
never applied - the type is just listed, but w/out the plus sign.

I've searched all of the place for information on
ExpandableObjectConveter but have found nothing that gives me a hint
as to the reasons it might or might not work.

Does anyone have any ideas?

Thanks,
Re: ExpandableObjectConverter not working Andy
3/17/2005 2:10:56 PM
I've answered my own question. Dumbness on my part. It had nothing
to do with the assembly. It turned out to be only one of my
expandable types that wasn't working, and only where I had added it to
a new control.

The problem was that I had forgotten to construct the expandable type
in it's parent container. So when the designer loaded it, there was
not yet a created object instance (of the expandable type) and thus,
it could not be used.

Andy



[quoted text, click to view]
AddThis Social Bookmark Button