Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DevExpress Skins not working

Does anyone what can cause the devExpress skin option for their controls to not work?

If I change the skinName of a control to Office 2010 Black for example, it doesn't do anything.

Thanks.

like image 459
TheGateKeeper Avatar asked Apr 12 '12 13:04

TheGateKeeper


1 Answers

You need to register the skins. Normally, you apply a Application wide skin at application start-up.

See this article at DevExpress online Documentation.

Here's what I normally do:

DevExpress.UserSkins.BonusSkins.Register(); DevExpress.UserSkins.OfficeSkins.Register();

You'll need to add the references ot the DevExpress's Skin DLLs. And after that you can just use the skin you want:

defaultLookAndFeel1.LookAndFeel.SetSkinStyle("Office 2010 Silver");

Where defaultLookAndFeel1 is a control dragged from the toolbox onto a WinForm. Dragging it to a base form is recommended. Then inherit remaining forms from the base form and all the application will give consistent Look & Feel.

Update: Latest DevExpress has changed namespace for custom skins. The last two lines might be important for you.

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

DevExpress.UserSkins.BonusSkins.Register();
DevExpress.Skins.SkinManager.EnableFormSkins();
DevExpress.Skins.SkinManager.EnableMdiFormSkins();
like image 200
Hassan Gulzar Avatar answered Sep 28 '22 08:09

Hassan Gulzar