界面组件DevExpress WinForm v23.1新版亮点 - 皮肤矢量图标全新升级 DevExpress WinForms拥有180组件和UI库能为Windows Forms平台创建具有影响力的业务解决方案。DevExpress WinForms能完美构建流畅、美观且易于使用的应用程序无论是Office风格的界面还是分析处理大批量的业务数据它都能轻松胜任DevExpress WinForm控件日前正式发布了今年第一个重大版本——v23.1此版本发布了增强了皮肤、矢量图标以及Data Grid控件功能等。DevExpress新旧版本帮助文档下载可进QQ qun获取169725316皮肤和矢量图标在Windows操作系统中支持默认应用模式新版本添加了一个全新的WindowsFormsSettings.TrackWindowsAppMode设置启用后。您的应用程序可以跟踪Windows操作系统中使用的默认应用程序模式设置并且仅在皮肤图库中显示浅色或深色调色板。可用于DevExpress WXI, Basic和 Bezier皮肤。C#static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); WindowsFormsSettings.TrackWindowsAppMode DevExpress.Utils.DefaultBoolean.True; Application.Run(new Form1()); }系统和自定义强调颜色一旦最终用户在在微软Windows中改变系统强调色DevExpress矢量皮肤会相应改变相关的颜色激活WindowsFormsSettings.TrackWindowsAccentColor设置可以启用此选项。C#using DevExpress.Utils; using DevExpress.XtraEditors; static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); WindowsFormsSettings.TrackWindowsAccentColor DefaultBoolean.True; Application.Run(new Form1()); }您还可以指定自定义的强调色并动态应用所需的外观。C#DevExpress.XtraEditors.WindowsFormsSettings.SetAccentColor(Color.FromArgb(16,124,65));The Bezier皮肤支持二级强调色使用WindowsFormsSettings.SetAccentColor2方法指定第二个强调色。WXI皮肤 - 增强渲染新版本使用自定义背景色(WXI皮肤*)增强了文本输入和下拉编辑器的渲染。Data Grid所见即所得和数据感知导出功能增强新版本为所有视图类型添加了一个新的PrintExportCompleted事件处理此事件来确定打印或导出视图数据是否没有错误使用e.Status事件参数确定操作是否成功、失败或被取消。C#using DevExpress.XtraEditors; using DevExpress.XtraGrid.Views.Base; public Form1() { InitializeComponent(); gridView1.PrintExportCompleted GridView1_PrintExportCompleted; } private void GridView1_PrintExportCompleted(object sender, PrintExportCompletedEventArgs e) { if(e.Status GridPrintExportResult.Error) XtraMessageBox.Show( new XtraMessageBoxArgs() { Text An unexpected error occurred while exporting data., Caption Error, ImageOptions new MessageBoxImageOptions() { SvgImage svgImageCollection1[0], SvgImageSize new Size(32, 32) } }); }Data Editors查找编辑器 - 多个项目选择DevExpress WinForm查找编辑器包括一个新的多项目选择选项使用此功能您可以在查找中显示复选框列并允许用户使用鼠标或键盘选择多个值。颜色编辑器 - 允许Null输入如果启用了AllowNullInput选项并且用户按CtrlDel或Ctrl0那么WinForms ColorEdit和ColorPickEdit控件现在将EditValue属性设置为null(在Visual Basic中没有)。新版本添加了一个新的NullColor属性这样您就可以指定一个自定义的空颜色。当用户重置编辑值时这个值被分配给编辑器的Color属性。