Posted 29 October 2024, 6:30 am EST - Updated 29 October 2024, 6:36 am EST
See attached sample - it has three questions/problems: I have a C1RibbonForm subclass and override “ThemeChanged” (yes, the comment states “Use internal only for theming support.”, but it is virtual and I thought it would me ;-)).
The reason to do so is that I wanted to do some post processing after the theme was applied.
ThemeTest.zip
When doing so, some things break:
Problem 1:
A messagebox about a non matching theme version is shown:
The reason is probably that your code internally tries to find the theme version from the assembly of my form, which is not “C1.Win.Themes” here and does not contain the expected “ControlThemeVersion” type
Type type = a.Assembly.GetType("C1.Win.Themes.ControlThemeVersion", throwOnError: false, ignoreCase: false);
Problem 2:
My override “ThemeChanging” is not called.
Problem 3:
I implemented “IC1Themeable”, and here “IC1Themeable.OnThemeChanged” is also not called.
It works if my form does not implement “ThemeChanging”. In this case, “IC1Themeable.OnThemeChanged” is called as expected. So this is probably the suggested solution.
Just want to bring this to your attention. If it is not supported, you probably should hide “ThemeChanged” or make it internal?
Best regards
Wolfgang