dev的XtraMessageBox控件使用起来很美观,但默认显示确定的是英文,如下图: 通过下面代码可使“OK”显示为中文:首先创建一个继承自Localizer的类: using DevExpress.XtraEditors.Controls; public class MessboxClass : Localizer { public override string GetLocalizedString(DevExpress.XtraEditors.Controls.StringId id)
需要定义一个继承子Localizer的类,然后重写GetLocalizedString public class MessboxClass : Localizer { public override string GetLocalizedString(DevExpress.XtraEditors.Controls.StringId id) { switch (id) { case StringId.XtraMessageBoxCancelButtonText: return "取消";