I would like to create a Designer that will allow me to add controls during runtime to a custom control, just like the System.Windows.Forms.UserControl.
I noticed that the UserControl uses the UserControlDocumentDesigner, because this is internal i cannot use it. So i will implement my own.
public class MyDesigner : DocumentDesigner
{
}
[Designer(typeof(PageDesigner))]
public partial class Page : ContainerControl
{
public MyPage()
{
InitializeComponent();
}
}
I want to create a new object that inherits from Page which also provides design time support. It needs to have both a Code view and a Designer view. Just like the UserControl. How do i tell Visual Studio to interperet objects that inherit from Page to provide this functionallity.
Cheers
Rohan