Visual Studio complains: Warning 1 The designer must create an instance of type \'RentalEase.CustomBindingNavForm\' but it cannot because the type is declared as abst
This worked for me with an abstract class inheriting a UserControl
public class AbstractCommunicatorProvider : TypeDescriptionProvider
{
public AbstractCommunicatorProvider(): base(TypeDescriptor.GetProvider(typeof(UserControl)))
{
}
public override Type GetReflectionType(Type objectType, object instance)
{
return typeof(UserControl);
}
public override object CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args)
{
objectType = typeof(UserControl);
return base.CreateInstance(provider, objectType, argTypes, args);
}
}
[TypeDescriptionProvider(typeof(AbstractCommunicatorProvider))]
public abstract partial class SelectorBase : UserControl
{
///class contents
}
I didn't need to add this to all derived classes but in your situation you may need to.