I have done this before but for some reason VS 2012 exploded this possible feature.
[Designer(typeof(BaseUserControlDesigner))]
public class BaseUserControl : UserControl
{
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
Public Panel ControlPanel
{
get { return this._panel;}
}
class BaseUserControlDesigner : ParentControlDesigner
{
public override void Initialize(IComponent component)
{
base.Initialize(component); //i have tried the following cast from this.Control and the component parameter
EntityDetailsUserControlBase educb = this.Control as EntityDetailsUserControlBase;
if (educb != null)
{
this.EnableDesignMode(educb.ControlPanel, "ControlPanel");
}
}
}
}I then have ChildUserControl : BaseUserControl but I CAN'T ADD Labels, or TextBoxes to the ControlPanel. It isn't there. I have no control.
This USED TO WORK. What is going on? What Changed? Why can't i expose a nested container control as the "Container" for a user control?
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
"Never Trust a computer. Your brain is smarter than any micro-chip."
PS - Don't mark answers on other people's questions. There are such things as Vacations and Holidays which may reduce timely activity, and until the person asking the question can test your answer, it is not correct just because you think it is. Marking it
correct for them often stops other people from even reading the question and possibly providing the real "correct" answer.