Back to Devexpress

BLOB Skins

skineditor-118467-export-and-apply-custom-skins-blob-skins.md

latest2.1 KB
Original Source

BLOB Skins

  • Jul 05, 2021

You can save custom skins as BLOB files (.blob and .xml pairs) and then load them in your projects.

Export Skins

In the Project Manager dialog, switch to the “Export” tab and click “Create Resources” to save the current skins.

Each skin is saved as a pair of .blob and .xml files.

Use BLOB Skins

In Visual Studio’s Solution Explorer window, add the newly generated skin files (.xml and .blob) to your project.

Change Build Action for the recently added files to “Embedded Resource”.

On application startup, register the custom skins as follows.

csharp
ApplicationSettingsHelper.LoadSettings(() => {
    var skinCreator = new SkinBlobXmlCreator(
        "my devexpress style", //Skin name.
        "MyApp1.CustomSkins", //Relative path to .blob and .xml files.
        typeof(Program).Assembly, null);
    SkinManager.Default.RegisterSkin(skinCreator);
});
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("my devexpress style");
Application.Run(new Form1());
vb
DevExpress.LookAndFeel.Design.ApplicationSettingsHelper.LoadSettings(
    Sub()
        Dim skinCreator = New DevExpress.Skins.Info.SkinBlobXmlCreator(
            "my devexpress style", 'Skin name
            "MyApp1",
            GetType(Form1).Assembly, Nothing
        )
        DevExpress.Skins.SkinManager.Default.RegisterSkin(skinCreator)
    End Sub)
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("my devexpress style")

Application.Run(New Form1)