Prev: is dotnet framework 4 compatiable with 3.5 app?
Next: about the interlocked class and the lock keyword
From: Atmapuri on 15 May 2010 05:28 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
From: Atmapuri on 15 May 2010 07:00
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 "Atmapuri" <janez.makovsek(a)usa.net> wrote in message news:909427F7-9003-4AC6-915B-E2B7B9F43428(a)microsoft.com... > 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 > > |