您当前的位置: 首页 > 

[DevExpress]Devexpress中统一设置字体样式的方法

发布时间:2020-05-28 17:11:33 ,浏览量:0

#region 设置默认字体、日期格式、汉化dev DevExpress.Utils.AppearanceObject.DefaultFont = new System.Drawing.Font("Tahoma", 12); DevExpress.XtraEditors.WindowsFormsSettings.DefaultFont= new System.Drawing.Font("Tahoma", 12); DevExpress.XtraEditors.WindowsFormsSettings.DefaultMenuFont = new System.Drawing.Font("Tahoma", 12); DevExpress.XtraEditors.WindowsFormsSettings.DefaultPrintFont= new System.Drawing.Font("Tahoma", 12); System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CHS");//使用DEV汉化资源文件 //设置程序区域语言设置中日期格式 System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("zh-CHS"); System.Globalization.DateTimeFormatInfo di = (System.Globalization.DateTimeFormatInfo)System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.Clone(); di.DateSeparator = "-"; di.ShortDatePattern = "yyyy-MM-dd"; di.LongDatePattern = "yyyy'年'M'月'd'日'"; di.ShortTimePattern = "H:mm:ss"; di.LongTimePattern = "H'时'mm'分'ss'秒'"; ci.DateTimeFormat = di; System.Threading.Thread.CurrentThread.CurrentCulture = ci; #endregion 
关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    108697博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0500s