Problem with Control-Property pointing zu component

K

Kristof Berger

Hi guys,

if got a little stuck in the last hours and can't find a way out. Maybe you
can.

Imagine class derived from component called "ObjectAccessor".
Next imagine a control derived from Textbox, but extended with a property
called "Accessor" of type "ObjectAccessor" and a property called
"AccessProperty" of type string, using it's own UITypeDesigner.

In the designer I can now drop an Instance of ObjectAccessor onto my page
and set it's properties.
Then I drop an instance of my TextBox-derived thingy onto the page. I can
set the property "Accessor" to the component. Even the UITypeDesigner
displays a combobox, containing all entries I expect (dependant on a
property set in the Accessor-component).

BUT:
In the initialize_components method there is the following code:

this.objectAccessor1 = new ObjectAccessor(this.component);
this.objectAccessor1.DescriptionFile = "any_description_file.xml";

That's fine and works.

But im missing the line, that assigns the component to the control, as set
in the designer.
I see the assignment in the HTML-source (accessor="objectAccessor1"), but
this only produces an error telling me, that no code could be created for on
object of type ObjectAccessor.

I browsed around for hours now, searching for hints. All I saw was dealing
with TypeConverters and/or CodeDomSerializers.
Am I going in the right direction?

Any hintsd would be greatly appreciated!


TIA!

- Kristof
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top