Hi!
Winforms serialization has changed from VS2003 to VS2005. Specifically,
if a public child object was marked with serialize attribute, it was
still invisible to the Winform designer, if it was derived from
MarshalByRef object type. The object became visible to the designer
only if it was marked with:
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
In VS2005, the object states are stored always. Even without
setting the DesignerSerializationVisibility.
So, I would like the child object of the component to be serializable, but
not visible to the designer, and at the same time accessible
to the user in run time (not from the designer).
How
Currently the child object is created by VS2005 Winforms designer and then
assigned to the public property. This is no good, because
the object contains unmanaged resources and Dispose is not called
for the object created by the designer. (using Finalize is out
of the question).
Thanks!
Atmapuri

Winforms serializaiton!
ggable
Basically what you want to do is this:< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
So, I would like the child object of the component to be serializable, but
not visible to the designer, and at the same time accessible
to the user in run time (not from the designer).
You need to place a [Browsable(false)] attribute on the property that want serialized but not visible in the PropertyGrid.
Please see http://msdn.microsoft.com/library/default.asp url=/library/en-us/dndotnet/html/usingpropgrid.asp for an excellent article on PropertyGrid control and how you can further customize it.