日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

步入DevExpress的使用(VS)

發(fā)布時(shí)間:2025/7/14 编程问答 53 豆豆
生活随笔 收集整理的這篇文章主要介紹了 步入DevExpress的使用(VS) 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1、下載安裝DevExpress控件(如DXperienceUniversal-11.1.12.exe),安裝后路徑:“C:\Program Files (x86)\DevExpress 2011.1”。

2、找到安裝后DevExpress控件的DLL(要使用的DLL),路徑是“C:\Program Files (x86)\DevExpress 2011.1\Components\Sources\DevExpress.DLL”,拷貝到自己需要的地方,以方便項(xiàng)目添加引用時(shí)通過(guò)“瀏覽”找到;不拷貝也可以,項(xiàng)目引用時(shí)選擇“項(xiàng)目集”>>“擴(kuò)展”下找到。

3、在界面的“工具箱”中,添加一選項(xiàng)卡,命名如:“DevExpress”,并右擊“選擇項(xiàng)”,在.Net Framework組件中找到需要的控件名(可按控件的首字符查找),如:“DefaultLookAndFeel”,然后添加對(duì)應(yīng)的DLL,如“DevExpress.Utils.v11.1.dll”(若自動(dòng)添加也可以不添加)。

4、向?qū)υ捒蛑刑砑?#xff1a;DefaultLookAndFeel、ComboBoxEdit控件等

5、實(shí)現(xiàn)的具體代碼如下:

(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>/// 應(yīng)用程序的主入口點(diǎn)。/// </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; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;namespace TestExpressSkins {class CommonFunctions{#region 單例private static CommonFunctions commFuncInstance = null;private CommonFunctions(){}public static CommonFunctions Singlon(){if (null == commFuncInstance){commFuncInstance = new CommonFunctions();}return commFuncInstance;}#endregion/// <summary>/// 皮膚全部枚舉出來(lái)放到一個(gè)ComboBoxEdit中/// </summary>/// <param name="comboBoxEdit"></param>public void AddAppStyles2ComboBoxEdit(ComboBoxEdit 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;}} }

?

總結(jié)

以上是生活随笔為你收集整理的步入DevExpress的使用(VS)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。