Design time serialization!

A

Atmapuri

Hi!

My component has two properties which cause
problems with serialization in the IDE:

int Field1;
MyObject Object1;

The MyObject can be (binary) serialized and that works fine on its own.

When this object is a property of a component, it can only
be edited with the component editor (displaying separate form).
When the component editor finishes, how can the designer know
or be notified that that this property has changed and that it should
update its value in the resource table?

Currently the code generated by the IDE designer looks like this:

this.myComponent.myChild.myObject =
((MyNamespace.MyObject)(resources.GetObject("resource.Templates1")));

The resource.Templates1 currently does not get to be updated
after the Form editor has been done with myComponent.

The other thing I would have to ensure that is that:

this.myComponent.myChild.myObject.Field1

is always set after myObject is initialized and not before and
user should still be able to set Field1 from the Properties window.

Thanks!
Atmapuri
 
A

Atmapuri

Hi!

Actually, ability to notify the designer that the contents of the component
has been changed and that it should refresh the properties after the edit
box has been closed, should do it.

Thanks!
Atmapuri
 

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

Top