windowsforms-2411-common-features-application-appearance-and-skin-colors-look-and-feel-how-to-customize-look-and-feel-of-specific-controls.md
DevExpress controls are rendered using global look-and-feel settings, which are exposed by the Default LookAndFeel object. This allows you to apply the same paint scheme to all forms in your WinForms application.
Use a control’s LookAndFeel property to override default look-and-feel settings:
LookAndFeel.UseDefaultLookAndFeel property to false to ignore default (global) settings.LookAndFeel settings as needed.The following example applies the “Office 2019 Black” skin to the ‘Cancel’ button (ButtonEdit):
using DevExpress.LookAndFeel;
namespace DXApplication {
public partial class Form1 : DevExpress.XtraEditors.XtraForm {
public Form1() {
InitializeComponent();
/* Specifies the default skin (the 'Basic' skin).
The default skin is applied to all UI controls displayed on the Form.*/
UserLookAndFeel.Default.SetSkinStyle(SkinStyle.Basic);
// Disables the default look-and-feel settings for the 'Cancel' button.
buttonCancel.LookAndFeel.UseDefaultLookAndFeel = false;
// Specifies the 'Office 2019 Black' skin for the 'Cancel' button.
buttonCancel.LookAndFeel.SkinName = SkinStyle.Office2019Black;
}
}
}
Imports DevExpress.LookAndFeel
Namespace DXApplication
Partial Public Class Form1
Inherits DevExpress.XtraEditors.XtraForm
Public Sub New()
InitializeComponent()
' Specifies the default skin (the 'Basic' skin).
' The default skin is applied to all UI controls displayed on the Form.
UserLookAndFeel.Default.SetSkinStyle(SkinStyle.Basic)
' Disables the default look-and-feel settings for the 'Cancel' button.
buttonCancel.LookAndFeel.UseDefaultLookAndFeel = False
' Specifies the 'Office 2019 Black' skin for the 'Cancel' button.
buttonCancel.LookAndFeel.SkinName = SkinStyle.Office2019Black
End Sub
End Class
End Namespace
You can also use DX Skin Colors to visually highlight specific DevExpress controls (for example, buttons):
using DevExpress.LookAndFeel;
namespace DXApplication22 {
public partial class Form1 : DevExpress.XtraEditors.XtraForm {
public Form1() {
InitializeComponent();
UserLookAndFeel.Default.SetSkinStyle(SkinStyle.Basic);
buttonCancel.Appearance.BackColor = DXSkinColors.FillColors.Danger;
buttonSave.Appearance.BackColor = DXSkinColors.FillColors.Success;
}
}
}
Imports DevExpress.LookAndFeel
Namespace DXApplication22
Partial Public Class Form1
Inherits DevExpress.XtraEditors.XtraForm
Public Sub New()
InitializeComponent()
UserLookAndFeel.Default.SetSkinStyle(SkinStyle.Basic)
buttonCancel.Appearance.BackColor = DXSkinColors.FillColors.Danger
buttonSave.Appearance.BackColor = DXSkinColors.FillColors.Success
End Sub
End Class
End Namespace
See Also
How to: Customize Look And Feel of All Controls within Application