This article from http://blog.sina.com.cn/s/blog_5d5c7ed60100ioig.html
It is an eternal theme to skin over software. In devexpress, changeForm skinIt is very simple. We don't need to create our own skin, and there are a lot of official products.SkinPackage, which is much easier to do on the basis of tannaiyin. So how can we make the form skin of our devexpress control more distinctive? This article will reveal it to you one by one.
Step 1 Let all forms inherit from devexpress. xtraeditors. xtraform.
Step 2: Add two references:
Devexpress. bonusskins. v9.2
Devexpress. officeskins. v9.2
Step 3: the first line of the main function of the program class at the software entryCodeAdd:
Devexpress. userskins. bonusskins. Register ();
Devexpress. userskins. officeskins. Register ();
Devexpress. Skins. skinmanager. enableformskins ();
Application. enablevisualstyles ();
Application. setcompatibletextrenderiNgdefault (false );
Application. Run (New formmain ());
Step 4: create a form base class, and add
1Public class frmbase: devexpress. xtraeditors. xtraform
2 {
3 Protected static devexpress. lookandfeel. defaultlookandfeel defalooklookandfeel = new devexpress. lookandfeel. defalooklookandfeel ();
4 }
Step 5: all new forms inherit from frmbase
Step 6: Enumerate all skins in one form and put them in a comboboxedit. The Code is as follows:
Foreach (devexpress. Skins. skincontainer skin devexpress. Skins. skinmanager. Default. skins)
Cmbappstyle. properties. Items. Add (skin. skinname );
Part 7: Set skin. How to Set skin? You only need to set the defaultlookandfeel of the base class. The Code is as follows: frmbase. defalooklookandfeel. lookandfeel. skinname = cmbappstyle. editvalue. tostring ();
In this way, allForm skinThey are all new.