Posted 15 January 2025, 7:55 am EST
Up to now it worked without problems to load the old themes into a .NET8 C1.Win.Themes.C1ThemeController. But with .493, this fails:
Exception Type: C1.Win.Themes.Serialization.SerializerException
Exception Message: Type [Enum-C1.Win.C1Themes.TabStyle] not found.
StackTrace:
at C1.Win.Themes.Serialization.Serializer.ReadObject(Type objType)
at C1.Win.Themes.Serialization.Serializer.ReadObject()
at C1.Win.Themes.ThemeItemCollection.C1.Win.Themes.Serialization.ISerializable.ReadProp(Serializer a, String b, Type c, String d)
at C1.Win.Themes.Serialization.Serializer.d(ISerializable a)
at C1.Win.Themes.Serialization.Serializer.ReadObject(ISerializable obj)
...
at C1.Win.Themes.Serialization.Serializer.Read(ISerializable obj, Stream stream)
at C1.Win.Themes.C1Theme.Load(Stream stream, C1ThemeFormat format)
at C1.Win.Themes.C1ThemeController.RegisterTheme(Stream stream, C1ThemeFormat format)
at C1.Win.Themes.C1ThemeController.RegisterTheme(String fileName)
See attached sample (“Old\BeigeOne.c1themez” is a theme from an older C1 version - probably beginning of 2024, “New\BeigeOne.c1themez” is from .693 and fails to load).
LegacyThemes.zip
I tracked it down to this snippet in the theme files:
<Enum-C1.Win.C1Themes.TabStyle Name="TabStyle">
<AllowedValues>Classic,Sloping,Rounded,Rectangle,Office2007,Office2010,Office365</AllowedValues>
</Enum-C1.Win.C1Themes.TabStyle>
It works if I change it to this:
<Enum-C1.Win.C1Themes.TabShape Name="TabShape">
<AllowedValues>Sloping,Rounded,Rectangle,Office365</AllowedValues>
</Enum-C1.Win.C1Themes.TabShape>
(see file “New_493\BeigeOne_Workaround.c1themez”)
Could you confirm that this is a valid workaround and that I picked the corresponding enum in the .NET8 version? If yes I could create a small powershell script to convert the c1themez files.
Best regards
Wolfgang