DevExpress是非常主流的.NET控件,目前全世界和中国都用很多用户使用,不过由于是英文版,初次接触的同学可能会觉得困难,这里就总结DevExpress常见的10个使用技巧。
1.TextEditor(barEditItem)取文本
string editValue = barEditItem1.EditValue.ToString(); //错误,返回null
string editValue = ((DevExpress.XtraEditors.TextEdit)barEditItem).EditValue.ToString(); //精确,返回文本框内容 DevExpress使用技巧
2.ComboBoxEdit(barEditItem)添加Item
string item = "comboboxItem1";
((DevExpress.XtraEditors.Repository.RepositoryItemComboBox)this.barEditItem.Edit).Items.Add(item);
3.ComboBoxEdit(barEditItem)取文本
string itemValue = this.barEditItem.EditValue.ToString();
4.Ribbon控件
//添加Page
DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage = new RibbonPage();
ribbonControl.Pages.Add(ribbonPage);
//添加Group
DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup = new RibbonPageGroup();
ribbonPage.Groups.Add(ribbonPageGroup);
//添加Button
DevExpress使用技巧总结
猜你喜欢
转载自blog.csdn.net/fangyuan621/article/details/120482528
今日推荐
周排行