DevExpress WinForms Skins - now showing

58 Views Asked by At

I have 2 desktop apps:

  1. .NET 4.8.0 Framework app, DevExpress 22.2

  2. .NET 8 Core app DevExpress 23.1.7 Both are WinForms-base. in #1 the "Dark Side" skin shows for entire app, but in #2 it does not. Unfortunately, my subscription is expired and DevExpress is not answering my questions. Here is my code in .NET Core app (#2) in Program.cs Main():

             SkinManager.EnableFormSkins();
             SkinManager.EnableMdiFormSkins();
             BonusProvidersRegistrator.Register(); // used in .NET 8
             //DevExpress.UserSkins.BonusSkins.Register(); // used  in >NET 4.8.0
    
             UserLookAndFeel ulaf = UserLookAndFeel.Default;
             ulaf.UseDefaultLookAndFeel = false;
             UserLookAndFeel.Default.SetSkinStyle("Dark Side");
    
             var services = new ServiceCollection();
    
             ConfigureServices(services);
    
             // Build ServiceProvider
             ServiceProvider = services.BuildServiceProvider();
    
             Application.Run(ServiceProvider.GetRequiredService<MainForm>());
    

I also tried without this line but it does not make a difference:

UserLookAndFeel.Default.SkinName = "Dark Side";

Any ideas? Is it a bug in DevExpress 23.1.7 or compatibility issue in 23.1.7?

1

There are 1 best solutions below

0
Leon On

Edit your project file and add:

    <PackageReference Include="DevExpress.Win.BonusSkins" Version="23.1.7" />

Then add to your main window in MainForm_Load:

WindowsFormsSettings.DefaultLookAndFeel.SetSkinStyle(skinStyle: DevExpress.LookAndFeel.SkinStyle.DarkSide);