Control Help

  • Thread starter Thread starter Tom J
  • Start date Start date
T

Tom J

I have a control (I'll call it ParentControl) that derives from
System.Windows.Forms.Panel,

this control hosts another control (I'll call it ChildControl) that I expose
as a public property so that I can edit it's properties in the property grid
at design time.

I am able to set the properties of ChildControl at design time, however I
cannot figure out how to persist the changes that I have made to
ChildControl....do I need to set a designer for it?

Thanks....
 
Apply this attribute to the Child property in the Parent class:

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ChildControl Child
{
get {...}
}

That tells the designer to recurse into the child and serialize it's
properties.

HTH;
Eric Cadwell
http://www.origincontrols.com
 
Back
Top