最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

winforms - How can I localize DevExpress.XtraEditors.DateEdit without specifying CurrentCulture? - Stack Overflow

programmeradmin5浏览0评论

How can I localize DevExpress.XtraEditors.DateEdit without specifying CurrentCulture?

Currently I know that I can localize it by specifying CurrentCulture, But it will cause the date format to change.

This is my code:

    public static void SetCurrentUICulture(string name)
    {
        if (string.IsNullOrEmpty(name))
        {
            name = "zh-CN";
        }
        
        Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(name);
        // Thread.CurrentThread.CurrentCulture = new CultureInfo(name);
  }

Is there any other way to do this?

发布评论

评论列表(0)

  1. 暂无评论