Custom control with treeview control not placing property changes in the designer partial class
I am creating a control that uses a treeview control. I have the treeview listed in the property grid of the control so as to set its properties within the custom control at design time. The treeview does change based on values changed in the property grid when in design mode but at run time they don't appear. When looking at the designer partial class the custom control's properties are listed but the treeview control within the custom control is not listed, which is why at run time the treeview properties do not set.
How do I get the treeview properties to show up in the designer partial class that hosts my custom control? I know it can be done I've seen other controls that have other controls embedded in them and they can set the properties using the propertygrid at design time and they work at run time.
Here's how I'm exposing the treeview control from within my custom control:
[Browsable(true),
NotifyParentProperty(true),
EditorBrowsable(EditorBrowsableState.Always),
DefaultValue(typeof(TreeView))]
public TreeView aTreeView
{
get
{
return theTreeView;
}
}
Frank