A newer version of this page is available. Switch to the current version.

Bonus and Custom Skin Registration

  • 2 minutes to read

You can add a skin library to a project and add specific code to register this library to use these skins at runtime (for example, DevExpress.BonusSkins.18.2.dll or a library created via the WinForms Skin Editor utility). Usually, the registration code should be called before the main form starts.

Register DevExpress.BonusSkins Library

At the application's startup, call the DevExpress.UserSkins.BonusSkins.Register method.


[STAThread]
static void Main() {
    // Skin registration.
    DevExpress.UserSkins.BonusSkins.Register();
    Application.Run(new Form1());
}

Register Custom Skins

You can create custom skins with the WinForms Skin Editor utility. See Export and Apply Custom Skins to learn how to obtain your custom skin library's registration code.

The following example shows how to register a custom SkinProject1 library when the application starts:


[STAThread]
static void Main() {
    Assembly asm = typeof(DevExpress.UserSkins.SkinProject1).Assembly; 
    DevExpress.Skins.SkinManager.Default.RegisterAssembly(asm); 
    Application.Run(new Form1());
}

public class SkinRegistration : Component {
    public SkinRegistration() {
        DevExpress.Skins.SkinManager.Default.RegisterAssembly(typeof(DevExpress.UserSkins.SkinProject1).Assembly); 
    }
}

After adding this code, rebuild the project and add the SkinRegistration component from the Visual Studio toolbox to the main application form.

Register Custom Skins for Use in Splash Screens and Wait Forms

Splash screens and wait forms created with the SplashScreenManager component run in a separate thread. Note that information on custom skins registered in the main thread is not available in the splash screen thread until you call the SplashScreenManager.RegisterUserSkins method.


SplashScreenManager.RegisterUserSkins(typeof(DevExpress.UserSkins.SkinProject1).Assembly);
splashScreenManager1.ShowWaitForm();
See Also