In my application, I have a BaseForm
which has a generic member in it:
public partial class BaseForm<T> : Form where T : Presenter
{
protected T Presenter;
public BaseForm()
{
InitializeComponent();
}
}
Now what i need is to have a form which is inherited from my BaseForm
public partial class SampleForm : BaseForm<SamplePresenter>
{
public SampleForm()
{
InitializeComponent();
Presenter = new SamplePresenter();
}
}
The problem is that the Visual Studio designer does not show my SampleForm
derived from BaseForm<T>
.
It gives this warning:
Warning 1 The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file:
SampleForm --- The base class 'Invoice.BaseForm' could not be loaded. Ensure the assembly has been referenced and that all projects have been built. 0 0
How can I overcome this?
P.S. I looked at this post but didn't really get the whole idea of how to solve this.