文檔金喜正規(guī)買球>>DevExpress使用教程>>DevExpress使用教程:Form窗體經驗小結
DevExpress使用教程:Form窗體經驗小結
本文總結了 DevExpress Form 窗體的一些使用心得:
1、設置子窗體依附父窗體
首先將父窗體的屬性中 IsMdiContainer 設置為 True , 就是將窗體設置為 MDI窗體。子窗體和父窗體都是繼承自RibbonForm的。
代碼如下:
1 MainList main = new MainList(); 2 main.MdiParent = this; 3 main.Show();
2、設置窗體加載框.
1 .添加 SplashScreenManager ,
2 .設置 SplashScreenManager 的 Active Splash Form 引用的窗體 winformwait1.
3 .編寫代碼
public void SqlToResult(string sql) { splashScreenManager1.ShowWaitForm(); DataTable dt = SQLiteHelper.ExecuteTable(sql); gridControl1.DataSource = dt; GetModifyGridView(dt); splashScreenManager1.CloseWaitForm(); }
3、當父窗體的IsMdiContainer設置為True時,子窗體自適應父窗體的大小
將子窗體的WindowState 設置為Maximized .
4、RibbonForm 去除左上角的三角
屬性 —> ShowToolbarCustomizeItem : False
代碼 :
RibbonControl.ShowToolbarCustomizeItem = False
5 、DevExpress 去除DX圖標或更換為自己的圖標
RibbonFrom - > 屬性 -> ApplicationIcon : 設置為自己的即可.或者為None