Back to Devexpress

SkinManager.EnableFormSkins() Method

windowsforms-devexpress-dot-skins-dot-skinmanager.md

latest7.9 KB
Original Source

SkinManager.EnableFormSkins() Method

Enables the title bar skinning feature for DevExpress forms and message boxes.

Namespace : DevExpress.Skins

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
public static void EnableFormSkins()
vb
Public Shared Sub EnableFormSkins

Remarks

Starting from version 17.1, the form title bar skinning feature is enabled by default. You can change this default behavior with the dedicated compatibility option (see Version Compatibility: Default Property Values), or with the WindowsFormsSettings.DisableFormSkins method.

The form title bar skinning feature paints the title bar and border of DevExpress forms and message boxes according to the current skin.

If the title bar skinning feature is disabled, you can enable it by calling the EnableFormSkins or SkinManager.EnableFormSkinsIfNotVista method at runtime. Typically, these methods should be called at application startup.

It’s possible to call the EnableFormSkins /SkinManager.EnableFormSkinsIfNotVista method later. In this instance, the DevExpress.LookAndFeel.LookAndFeelHelper.ForceDefaultLookAndFeelChanged method needs to be called after enabling skins. This forces the form’s title bar to be repainted:

csharp
DevExpress.Skins.SkinManager.EnableFormSkins();
DevExpress.LookAndFeel.LookAndFeelHelper.ForceDefaultLookAndFeelChanged();
vb
DevExpress.Skins.SkinManager.EnableFormSkins()
DevExpress.LookAndFeel.LookAndFeelHelper.ForceDefaultLookAndFeelChanged()

Note

When a Windows Aero scheme is applied (for instance, in Windows Vista), the title bar skinning feature is not applied to RibbonForms unless the RibbonForm.AllowFormGlass option is set to False.

The following code snippets (auto-collected from DevExpress Examples) contain references to the EnableFormSkins() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-xtraform-center-caption/CS/WindowsApplication1/Program.cs#L17

csharp
{
    SkinManager.EnableFormSkins();
    Application.EnableVisualStyles();

winforms-grid-copy-paste/CS/Programcs.cs#L16

csharp
static void Main() {
    SkinManager.EnableFormSkins();
    Application.EnableVisualStyles();

winforms-document-manager-web-browser-ui/CS/Program.cs#L18

csharp
Application.SetCompatibleTextRenderingDefault(false);
DevExpress.Skins.SkinManager.EnableFormSkins();
Application.Run(new Form1());

winforms-grid-implement-crud-operations-xpinstantfeedbacksource/CS/DXServermode2/Program.cs#L30

csharp
DevExpress.Skins.SkinManager.EnableFormSkins();
DevExpress.UserSkins.BonusSkins.Register();

how-to-keep-a-look-and-feel-of-windows-forms-in-sync-e2243/CS/ThreadedSkinning/Program.cs#L21

csharp
DevExpress.UserSkins.BonusSkins.Register();
DevExpress.Skins.SkinManager.EnableFormSkins();
DevExpress.LookAndFeel.LookAndFeelHelper.ForceDefaultLookAndFeelChanged();

winforms-xtraform-center-caption/VB/WindowsApplication1/Program.vb#L14

vb
Sub Main()
    Call SkinManager.EnableFormSkins()
    Call Application.EnableVisualStyles()

winforms-grid-copy-paste/VB/Programcs.vb#L20

vb
Shared Sub Main()
    SkinManager.EnableFormSkins()
    Application.EnableVisualStyles()

winforms-document-manager-web-browser-ui/VB/Program.vb#L15

vb
Application.SetCompatibleTextRenderingDefault(False)
DevExpress.Skins.SkinManager.EnableFormSkins()
Call Application.Run(New Form1())

winforms-grid-implement-crud-operations-xpinstantfeedbacksource/VB/DXServermode2/Program.vb#L26

vb
Application.SetCompatibleTextRenderingDefault(False)
DevExpress.Skins.SkinManager.EnableFormSkins()
DevExpress.UserSkins.BonusSkins.Register()

how-to-keep-a-look-and-feel-of-windows-forms-in-sync-e2243/VB/ThreadedSkinning/Program.vb#L17

vb
DevExpress.UserSkins.BonusSkins.Register()
DevExpress.Skins.SkinManager.EnableFormSkins()
DevExpress.LookAndFeel.LookAndFeelHelper.ForceDefaultLookAndFeelChanged()

See Also

AllowFormSkins

DisableFormSkins()

EnableFormSkinsIfNotVista()

WinForms Skins and Color Palettes

EnableFormSkins()

SkinManager Class

SkinManager Members

DevExpress.Skins Namespace