1. download and install the devexpresscontrol file (such as dxperienceuniversal-11.1.12.exe) in the following path: "C: \ Program Files (x86) \ devexpress 2011.1 ".
2. Find the DLL of the devexpress control after installation (the DLL to be used) in the path "C: \ Program Files (x86) \ devexpress 2011.1 \ Components \ sources \ devexpress. "DLL", copy to the desired place, to facilitate the project to be found by "browsing" when adding reference; do not copy it, select "project set"> "extension" When referencing a project.
3. In the Toolbox on the page, add a tab named "devexpress" and Right-click "select item. in the. NET Framework component, find the required control name (which can be searched by the first character of the control), such as "defaultlookandfeel", and then add the corresponding DLL, such as "devexpress. utils. v11.1.dll "(if it is automatically added, it can be left blank ).
4. Add the defaultlookandfeel and comboboxedit controls to the dialog box.
5. The specific implementation code is as follows:
(1) program. CS
Using system; using system. collections. generic; using system. LINQ; using system. threading. tasks; using system. windows. forms; namespace testexpressskins {static class program {// <summary> // main entry point of the application. /// </Summary> [stathread] Static void main () {devexpress. userskins. bonusskins. register (); devexpress. userskins. officeskins. register (); devexpress. skins. skinmanager. enableformskins (); application. enablevisualstyles (); application. setcompatibletextrenderingdefault (false); application. run (New form1 ());}}}
(2) form1.cs
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace TestExpressSkins{ public partial class Form1 : DevExpress.XtraEditors.XtraForm //Form { private CommonFunctions commFunc = null; public Form1() { InitializeComponent(); commFunc = CommonFunctions.Singlon(); } private void Form1_Load(object sender, EventArgs e) { commFunc.AddAppStyles2ComboBoxEdit(cmbAppStyle); } private void cmbAppStyle_SelectedIndexChanged(object sender, EventArgs e) { this.defaultLookAndFeel1.LookAndFeel.SkinName = cmbAppStyle.EditValue.ToString(); } }}
(3) commonfunctions. CS
Using devexpress. xtraeditors; using system. collections. generic; using system. LINQ; using system. text; using system. threading. tasks; namespace testexpressskins {class commonfunctions {# region Singleton Private Static commonfunctions commfuncinstance = NULL; private commonfunctions () {} public static commonfunctions singlon () {If (null = commfuncinstance) {commfuncinstance = new commonfunctions ();} return commfuncinstance ;} # endregion // <summary> // all the skins are enumerated and put in comboboxedit /// </Summary> /// <Param name = "comboboxedit"> </Param> Public void addappstyles2comboboxedit (comboboxedit) {foreach (devexpress. skins. skincontainer skin in devexpress. skins. skinmanager. default. skins) {comboboxedit. properties. items. add (skin. skinname) ;}} public bool tmpfunc () {bool bflag = true; return bflag ;}}}
Step into using devexpress ()