Multiple inheritance of abstract forms

I have an abstract base control BaseControlfor which I decided not to display child forms with the following message .

Now I have many controls that share some common properties, for which I want to create an intermediate abstract class to rearrange various common properties and force all descendants to implement some other properties.

[TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider<BaseControl, UserControl>))]
public abstract partial class BaseControl : UserControl {
  ...
  ...
  ...
}
 [TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider<BaseControl2, BaseControl>))]
public abstract partial class BaseControl2 : BaseControl {
  ...
  ...
  ...
}

Unfortunately, this will not work, the designer complains that he could not create an instance of the abstract class BaseControl2for my subordinate controls.

Any suggestion on how to resolve this?

+4
1

, AbstractControlDescriptionProvider - , .

, , , :)

0

Source: https://habr.com/ru/post/1660489/


All Articles