Developer Express右键菜单显示汉化

 

//新建一个类,内容为:

using System;

using DevExpress.XtraEditors.Controls;

using DevExpress.XtraGrid.Localization;

namespace UI

{

       public class ChineseLocalizer : Localizer

       {

           public override string Language { get { return "Chinese"; } }

           // overriding the GetLocalizedString method

           public override string GetLocalizedString(StringId id)

           {

               switch (id)

               {

                   // ...

                   case StringId.TextEditMenuCut: return "剪切";

                   case StringId.TextEditMenuCopy: return "复制";

                   case StringId.TextEditMenuPaste: return "粘贴";

                   case StringId.TextEditMenuDelete: return "删除";

                   case StringId.TextEditMenuUndo: return "撤销";

                   case StringId.TextEditMenuSelectAll: return "全选";

                   case StringId.CheckChecked: return "是";

                   case StringId.CheckUnchecked: return "否";

                   case StringId.LookUpEditValueIsNull: return "请选择";

                   // ...

               }

               return "";

           }

       }

}

//然后在Program.cs中的main函数里加入

//DevExpress控件本地化

DevExpress.XtraEditors.Controls.Localizer.Active = new UI.ChineseLocalizer();

阅读更多
版权声明:大道至简,悟在天成。本文为博主原创文章,未经博主允许不得转载。http://blog.csdn.net/fwj380891124 https://blog.csdn.net/fwj380891124/article/details/6886117
文章标签: express string class ui
个人分类: 技术交流
上一篇DevExpress控件之"treeList"
下一篇Devexpress TreeList 绑定 方式 速度 优化
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭