Posted 17 June 2025, 3:35 am EST - Updated 17 June 2025, 3:41 am EST
We have a form that has an abstract base class in its parent hierarchy.
The theme is not applied to this form.
See attached sample ThemeControllerAbstract.zip: the class “FormChildSub” has a abstract base class “FormChildAbstract”, which has a base class “FormBase”.
When applying a theme to an instance of “FormChildSub”, the form itself is not themed:
It works if the base class is not abstract:
I know that it is a bad idea to use abstract forms, because winforms designer cannot handle it. But we have done this years ago, and if we want to edit the child form in designer, we have to remove the “abstract” declaration of the base class and add it again afterwards.
ILSpy pointed me to this piece of code where a “IsAbstract” check is done:
Is there any chance to fix theming of forms with abstract base classes? Or is there a reason that makes it impossible for you to support this?
Best regards
Wolfgang