Where are all the themes for .net 6+?

Posted by: kbj on 8 December 2022, 3:52 am EST

  • Posted 8 December 2022, 3:52 am EST

    Is there a plan to include all the great themes from the earlier version to work in .net 6+?

  • Posted 8 December 2022, 6:08 pm EST

    Hi,

    We apologize for any inconvenience.

    The development team didn’t port the legacy themes to .Net6 as they are out of style on modern OS. And they will improve the existing themes and will add more themes for modern OS.

    For the old themes in .Net6, we have already discussed this with the development team. As per them, you can use the themes by saving them from the .NET 4.5.2 ThemeDesigner App. You can then open the themes in .NET 6 ThemeDesigner App just to make sure that all the theme properties are working fine in the .NET 6. This way, you will be able to use the old themes in .NET 6.

    Please note that the themes may change externally a little bit since there is no replacement for everything in .NET 6 themes. [Internal Tracking Id - C1WIN-28275]

    Best Regards,

    Nitin

  • Posted 8 December 2022, 10:20 pm EST

    Hi kbj,

    I asked the same question and here is a small sample that shows how to register an old theme: https://www.grapecity.com/forums/winforms-edition/net6-c1flexgrid-border-color-has-changed#47966

    Saving the themes in Designer App should not be necessary according to the replies in the other thread.

    I hope that C1 brings back at least some of the old themes.

    Best regards

    Wolfgang

  • Posted 20 February 2024, 4:54 am EST

    Hi Wolfgang,

    Here’s the solution I came up with:

    First I zipped all the old themes from the

    C:\Program Files (x86)\MESCIUS\ComponentOne\WinForms\C1Themes\Themes

    directory and added the zip file to the project resources.

    Then added them to the controller using the following task (since it takes some time and I didn’t want to hang up the program.

        Public Sub load()
            Dim task = New Task(AddressOf loadThemes)
            task.Start()
        End Sub
        Private Sub loadThemes()
            Using ms = New MemoryStream(My.Resources.C1Themes)
                Dim zipArchive = New ZipArchive(ms)
                For Each zipArchiveEntry In zipArchive.Entries
                    Dim themeName = Path.GetFileNameWithoutExtension(zipArchiveEntry.Name)
                    If Not C1ThemeController.IsThemeRegistered(themeName) Then
                        Using zs = zipArchiveEntry.Open
                            Using zms = New MemoryStream
                                zs.CopyTo(zms)
                                C1ThemeController.RegisterTheme(zms, C1ThemeFormat.Compressed)
                            End Using
                        End Using
                    End If
                Next
            End Using
        End Sub

    -Kingman

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels